November 23, 2013 computing ceil at compile time | ||||
---|---|---|---|---|
| ||||
Hi, with ldc maybe that works with an another compiler, i fail to compute std.math.ceil at compile time minimal example: http://paste.fedoraproject.org/56332/52482751 $ ldc2 compute.d main.d -of ok /usr/include/d/std/math.d(2471): Error: ceill cannot be interpreted at compile time, because it has no available source code compute.d(5): called from here: ceil(cast(real)i) compute.d(8): called from here: foo(2.4F) |
November 23, 2013 Re: computing ceil at compile time | ||||
---|---|---|---|---|
| ||||
Posted in reply to bioinfornatics | bioinfornatics:
> $ ldc2 compute.d main.d -of ok
> /usr/include/d/std/math.d(2471): Error: ceill cannot be interpreted at compile time, because it has no available source code
> compute.d(5): called from here: ceil(cast(real)i)
> compute.d(8): called from here: foo(2.4F)
At the moment some std.math functions that deal with floating point numbers can't be run at compile-time.
Bye,
bearophile
|
Copyright © 1999-2021 by the D Language Foundation