-3

I have recently decompiled a Java program I had written quite a while ago, and I noticed where I had Math.pi it replaced it with 3.1415... etc, I also have gotten this weird number and I cannot figure out what it is, if it was a number I put in myself or the result of something the compiler did like with Pi. What is this number?

The number is 0.7853981633974483


Edit: Thank you, those who helped me I am sorry, I was not able to figure out this simple thing, I now know what it is and I will consider that in the future, I now know that when you decompile Java, it puts 3.1415... in place of the math.pi, and if it is math.pi * 2 it would do that math and put 6.283.. in place of it. I did not know that before.

3
  • 2
    Nope. It's not April Fool's Day. So there is someone smart enough to write a Java program that uses Math.Pi and then decompile it but not recognise 3.14... Come on. Has to be a Troll...
    – John3136
    Feb 13, 2017 at 23:32
  • Math.PI. and weird decimal value 3.1415926. Possible duplicate of [Am I Troll?] Feb 13, 2017 at 23:43
  • Oooooooops sorry. I stopped halfway writing it I forgot something
    – user140052
    Feb 13, 2017 at 23:43

1 Answer 1

0

0.785398... is pi / 4. Without knowing more about the code we can't know if that makes sense to you or not...

1
  • It does I am sorry that I couldn't figure that out myself, wow okay that makes sense now
    – user140052
    Feb 14, 2017 at 0:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.