Is this normal or a bug ?

Steven Schveighoffer schveiguy at gmail.com
Mon Jul 3 15:50:43 UTC 2023


On 7/3/23 4:24 AM, Mehdi wrote:

> 
> Unfortunately, the assert statement fails in this case. I'm wondering if 
> this discrepancy is due to the different float representations, a bug, 
> or if I'm doing something wrong. Any insights would be greatly appreciated!

D always performs floating point math at the highest precision possible. 
C++ does not. So it's a minor difference in representation between 
`double` and `real`.

-Steve


More information about the Digitalmars-d mailing list