Re: 80 bit precision ?
Terry Reedy a écrit :
> [...]
> Last I read, in CPython, the float type encapsulates a C double.
> So, does any C compiler implements doubles as 80 bit floats?
I seriously doubt it.
> Or, if it has 64 bit
> doubles and 80 bit long doubles, are the latter transparently
> substitutible for the former, so that you could change Python's
> float declaration and have everything work as expected? (I an
> not sure of either.)
Mmmmmm ... the python C code implementing the math module is
probably not that polymorphic <wink>. Even a call to "sqrt"
does not work as expected if the argument is a long double.
"sqrtl" should be use instead.
Cheers,
SB
.
Relevant Pages
- Re: using MFC VC++ - which is more efficient - float or double?
... I'm about to say may be null and void. ... I don't think its true that the hardware does everything as doubles. ... there's nothing that is 'saved' by using float. ... If you are working with large sets of data, then memory. ... (microsoft.public.vc.mfc) - Re: using MFC VC++ - which is more efficient - float or double?
... I'm about to say may be null and void. ... As far as I know everything is floating point and doubles takes extra processing to emulate. ... there's nothing that is 'saved' by using float. ... This gets to be a problem sometimes even with a Gig or several Gigs of memory. ... (microsoft.public.vc.mfc) - Re: using MFC VC++ - which is more efficient - float or double?
... Measurements made in debug mode are usually useless. ... float f2 = 5.0; ... __declspecvoid DoubleComputation() ... I don't think its true that the hardware does everything as doubles. ... (microsoft.public.vc.mfc) - Re: using MFC VC++ - which is more efficient - float or double?
... float f2 = 5.0; ... int I = 5000000; ... __declspecvoid DoubleComputation() ... As far as I know everything is floating point and doubles takes extra processing to emulate. ... (microsoft.public.vc.mfc) - Re: why float
... A double *is* a float with more precision. ... It is possibly to do with spurious precision in the doubles - in numerical ... I think it depends on teh algorithm as well. ... single-precision in order to stop rounding errors from amplifying ... (microsoft.public.dotnet.languages.csharp) |
|