`acos` returning `-nan`?

Jonathan Levi catanscout at gmail.com
Sun Nov 24 01:07:48 UTC 2019


On Saturday, 23 November 2019 at 18:09:43 UTC, Timon Gehr wrote:
> You can print the number at a higher precision:
>
> writefln!"%.16f"(failing); // -1.0000000130385160

Oh thanks, that is how that can be done.

> I.e., it is actually slightly smaller than -1.
> You either have to debug your data source or manually clip the 
> value into the range [-1.0,1.0] before you call acos.

Oh, right, duh, thanks.




More information about the Digitalmars-d mailing list