Differences in results when using the same function in CTFE and Runtime

Abdulhaq alynch4048 at gmail.com
Tue Aug 13 11:09:06 UTC 2024


On Tuesday, 13 August 2024 at 08:33:51 UTC, Timon Gehr wrote:

>
> It's annoying anyway, and we should hold programming languages 
> to a higher standard than that.
>
>
> Well, I think the x87 is a bad design as a compilation target. 
> If you are targeting that with a compiler whose developers by 
> default do not care about reproducibility, expect weird 
> behavior. These instructions are now deprecated, so the 
> calculation should change a bit.

It's an interesting discussion, but we are where we are, and I 
think you'd agree that the OP should understand that in the 
current world of "systems"  programming languages, this behaviour 
would not be viewed as a "bug".

I'm only being somewhat tongue-in-cheek when I say that his 
application, viewing fractals, could be considered a kind of 
"chaos amplifier" that is especially prone to these sorts of 
issues.

I'm going to guess that the situation we're in is due to 
preference of speed over reproduceability in the days when 
computers ran much more slowly than they do now. Would we choose 
a different priority these days? I don't know.


More information about the Digitalmars-d mailing list