|
From: Christian PANEL on 17 May 2008 07:58 does someone tell me why microsoft VC++ doesn't know "long double" variables and translate them in "double" ? so as a long double variable is impossible to store. long double r1=240.0L; generate ;long double r1=240.0L; 0041140E fld qword ptr [__real(a)406e000000000000 (415860h)] 00411414 fstp qword ptr [r1] instead of fld tbytes ptr... and so on.
From: Bo Persson on 17 May 2008 08:08 Christian PANEL wrote: > does someone tell me why microsoft VC++ doesn't know "long double" > variables and translate them in "double" ? > so as a long double variable is impossible to store. > > long double r1=240.0L; > > generate > > ;long double r1=240.0L; > 0041140E fld qword ptr [__real(a)406e000000000000 (415860h)] > 00411414 fstp qword ptr [r1] > > instead of > > fld tbytes ptr... and so on. I believe the reason is that they want to have the same precision for long double on all the platforms supported by the compiler. That means using the least common denominator. Earlier versions did use a 10 byte long double, but that changed about 10 years ago. Bo Persson
From: Christian PANEL on 17 May 2008 08:26 thanks ! that's a good reason. You can add a couple of years : I haved used VC5 and this caracteristic was present (that doesnt makes me feel much younger :o) ) "Bo Persson" <bop(a)gmb.dk> a �crit dans le message de news: 69805gF31569uU1(a)mid.individual.net... > Christian PANEL wrote: >> does someone tell me why microsoft VC++ doesn't know "long double" >> variables and translate them in "double" ? >> so as a long double variable is impossible to store. >> >> long double r1=240.0L; >> >> generate >> >> ;long double r1=240.0L; >> 0041140E fld qword ptr [__real(a)406e000000000000 (415860h)] >> 00411414 fstp qword ptr [r1] >> >> instead of >> >> fld tbytes ptr... and so on. > > I believe the reason is that they want to have the same precision for long > double on all the platforms supported by the compiler. That means using > the least common denominator. > > Earlier versions did use a 10 byte long double, but that changed about 10 > years ago. > > > Bo Persson > >
From: QbProg on 17 May 2008 11:13 Makes no sense to me , since in X86 the floating point unit works well with 80bit numbers.... If one want to use 64 bit numbers in every platform, just stuck with normal doubles! :) QbProg
From: Christian PANEL on 17 May 2008 11:28 Bo wanted to say perhaps that long double is not 80 bit wide on all systems .... and so use of "long double"could differ from one platform to another (but it's also for integer...) ?? Perhaps it reduces FPU overflow, underflow ??? "QbProg" <tholag(a)gmail.com> a �crit dans le message de news: 7bdbbdfe-a4a6-47e1-b6dc-6fc47b0648dd(a)m36g2000hse.googlegroups.com... > Makes no sense to me , since in X86 the floating point unit works well > with 80bit numbers.... > If one want to use 64 bit numbers in every platform, just stuck with > normal doubles! > > :) > QbProg
|
Pages: 1 Prev: Some data type question Next: errors pointing to the message map |