On 03/10/18 20:05, Santiago A. wrote:
> What does java does? I don't know. Perhaps it just rounds the output, 
> try  System.out.println(ans==0.0). Perhaps it uses a high precision that 
> *in this case* gets always 0.

I investigated that too. Under Java, double is always 64-bit based. So I
guess the same reason 64-bit FPC had no issues with the calculations either.


"double: The double data type is a double-precision 64-bit IEEE 754
floating point."

  --
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html



Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to