On 07/22/14 08:15, Iain Buclaw via Digitalmars-d wrote:
> On 21 Jul 2014 22:10, "Artur Skawina via Digitalmars-d" 
> <[email protected] <mailto:[email protected]>> wrote:
>> For D that is not possible -- if an expression is valid at run-time
>> then it should be valid at compile-time (and obviously yield the same
>> value).
> 
> ...most of the time.
> 
> CTFE is allowed to do things at an arbitrary precision in mid-flight when 
> evaluating an expression.

That will work for FP, where excess precision is allowed, but will not work
for integer arithmetic. Consider code which uses hashing and hash-folding
functions which rely on wrapping arithmetic. If you increase the precision
then those functions will yield different values. Now a hash value
calculated at CT is invalid at RT...

artur

Reply via email to