[fpc-pascal] Division by Zero

Andreas Schneider aksdb at gmx.de
Tue Aug 23 09:16:46 CEST 2011


At Tuesday, 23.08.2011 on 8:57 Michael Fuchs wrote:
> Hello,
> 
>    WriteLn(FloatToStr(100 / 0));
> 
> This code prints on the screen "+Inf", but I think it should be "NaN".
> Is this a bug or a special case in computer arithmetic?

http://en.wikipedia.org/wiki/Division_by_zero#In_computer_arithmetic

-- 
Best Regards,
Andreas



More information about the fpc-pascal mailing list