Speed of math function atan: comparison D and C++

Andrea Fontana nospam at example.com
Tue Mar 6 08:18:24 UTC 2018


On Monday, 5 March 2018 at 20:11:06 UTC, H. S. Teoh wrote:
> Walter has been adamant that we should always compute 
> std.math.* functions with the `real` type
> T

I don't understand why atan(float) returns real and atan(double) 
return real too. If I'm working with float, why does it return a 
real? If you want to comute with real is ok, but shouldn't be T 
atan(T) rather than real atan(T)?

I'm missing something.

Andrea


More information about the Digitalmars-d-learn mailing list