Re: Avoiding Overflow
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Mon, 3 Oct 2005 21:37:04 -0700
I think the FPU mode is set by default to 'double' precision, not 80 bit,
even though the registers are 80 bit. You can even set the precision to
'float'.
"Jason Doucette" <www.jasondoucette.com> wrote in message
news:uWVkQ9CyFHA.1412@xxxxxxxxxxxxxxxxxxxxxxx
>> Actually, this is incorrect as the multiply will be calculated first and
>> it can cause an overflow.
>
> Actually, with MS's optimizing compiler, all floating point computations
> are done on the FPU, which uses 10-byte floating point storage internally.
> All intermediate calculations are made on the FPU, with only the final
> result stored back to the float / double type that we were using.
>
> Therefore, the overflow would not occur when using float / double. If
> MSVC++ supported "long double" as a 10-byte float (why doesn't it?), we
> would be able to test this the overflow possibility. Until then, no
> worries.
>
> --
>
> Jason Doucette / Xona.com
> www.jasondoucette.com / www.xona.com
>
>
.
- References:
- Re: Avoiding Overflow
- From: Jason Doucette
- Re: Avoiding Overflow
- From: Jason Doucette
- Re: Avoiding Overflow
- Prev by Date: crashed Queue .
- Next by Date: Re: Find symbol in the debugger
- Previous by thread: Re: Avoiding Overflow
- Next by thread: Re: debugger problem?
- Index(es):
Relevant Pages
|