D - [Bug?] dmd floating point precision
- Manfred Nowak (17/17) Mar 12 2004 One of the results in the thread "[Performance] dmd outperforms gcc C an...
- C (11/28) Mar 12 2004 Do you have a site where your posting the results of these tests ?
- Manfred Nowak (4/5) Mar 13 2004 No. I do not want neither, not disqualify dmd in the public nor attract
- Walter (4/21) Mar 12 2004 There could be many reasons for the differences. Without seeing the code...
- Manfred Nowak (5/7) Mar 13 2004 Because of the copyright of the code here is the link again:
- Walter (5/21) Mar 21 2004 The results differ likely because of how long the 80 bit temporaries are
- Manfred Nowak (6/11) Mar 21 2004 [...]
- Walter (5/15) Mar 22 2004 The "somehow" could be little more than a random side effect, not someth...
One of the results in the thread "[Performance] dmd outperforms gcc C and several others in trigonometric functions" is that dmd is slow in long arithmetic. One result I did not mention there: the output of the double arithmetic differs from gcc to dmd. I once read that the output of floating point operations is defined to the bit. If true, then the question is which of both is buggy. To have some ground to this I have run a bc script with scale set to thirty for some hours. The outputs: gcc: 10011632717.388229 dmd: 10011632717.505636 bc : 10011632717.40994285037819773240630676856 Needless to say, that the output from dmc is the same as that from dmd. The maximal error for a single fp operation for numbers in this magnitude is in the order of 2.22302903141305656980e-06. Comments? So long.
Mar 12 2004
Do you have a site where your posting the results of these tests ? C On Sat, 13 Mar 2004 01:03:26 +0100, Manfred Nowak <svv1999 hotmail.com> = wrote:One of the results in the thread "[Performance] dmd outperforms gcc C =andseveral others in trigonometric functions" is that dmd is slow in long=arithmetic. One result I did not mention there: the output of the double arithmeti=cdiffers from gcc to dmd. I once read that the output of floating point=operations is defined to the bit. If true, then the question is which =ofboth is buggy. To have some ground to this I have run a bc script with scale set to thirty for some hours. The outputs: gcc: 10011632717.388229 dmd: 10011632717.505636 bc : 10011632717.40994285037819773240630676856 Needless to say, that the output from dmc is the same as that from dmd=.The maximal error for a single fp operation for numbers in this magnit=udeis in the order of 2.22302903141305656980e-06. Comments? So long.-- = Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Mar 12 2004
C wrote:Do you have a site where your posting the results of these tests ?No. I do not want neither, not disqualify dmd in the public nor attract customers to M$. So long!
Mar 13 2004
There could be many reasons for the differences. Without seeing the code, there's no way to tell. "Manfred Nowak" <svv1999 hotmail.com> wrote in message news:c2tjre$2ve5$1 digitaldaemon.com...One of the results in the thread "[Performance] dmd outperforms gcc C and several others in trigonometric functions" is that dmd is slow in long arithmetic. One result I did not mention there: the output of the double arithmetic differs from gcc to dmd. I once read that the output of floating point operations is defined to the bit. If true, then the question is which of both is buggy. To have some ground to this I have run a bc script with scale set to thirty for some hours. The outputs: gcc: 10011632717.388229 dmd: 10011632717.505636 bc : 10011632717.40994285037819773240630676856 Needless to say, that the output from dmc is the same as that from dmd. The maximal error for a single fp operation for numbers in this magnitude is in the order of 2.22302903141305656980e-06. Comments? So long.
Mar 12 2004
Walter wrote:There could be many reasons for the differences. Without seeing the code, there's no way to tell.Because of the copyright of the code here is the link again: http://www.ocf.berkeley.edu/~cowell/research/benchmark/code/ The adaption D is straight forward, if needed at all. So long!
Mar 13 2004
"Manfred Nowak" <svv1999 hotmail.com> wrote in message news:c2tjre$2ve5$1 digitaldaemon.com...One of the results in the thread "[Performance] dmd outperforms gcc C and several others in trigonometric functions" is that dmd is slow in long arithmetic. One result I did not mention there: the output of the double arithmetic differs from gcc to dmd. I once read that the output of floating point operations is defined to the bit. If true, then the question is which of both is buggy. To have some ground to this I have run a bc script with scale set to thirty for some hours. The outputs: gcc: 10011632717.388229 dmd: 10011632717.505636 bc : 10011632717.40994285037819773240630676856 Needless to say, that the output from dmc is the same as that from dmd. The maximal error for a single fp operation for numbers in this magnitude is in the order of 2.22302903141305656980e-06. Comments?The results differ likely because of how long the 80 bit temporaries are kept around. If you do it with long doubles, the answer comes pretty close to the bc one.
Mar 21 2004
Walter wrote: [...][...] This answer implies that gcc is somehow better suited to problems that fall into the same category. So long!gcc: 10011632717.388229 dmd: 10011632717.505636 bc : 10011632717.40994285037819773240630676856The results differ likely because of how long the 80 bit temporaries are kept around.
Mar 21 2004
"Manfred Nowak" <svv1999 hotmail.com> wrote in message news:c3llth$qgd$2 digitaldaemon.com...Walter wrote: [...]The "somehow" could be little more than a random side effect, not something to be relied on. If you want to rely on better precision, use long double instead of double.[...] This answer implies that gcc is somehow better suited to problems that fall into the same category.gcc: 10011632717.388229 dmd: 10011632717.505636 bc : 10011632717.40994285037819773240630676856The results differ likely because of how long the 80 bit temporaries are kept around.
Mar 22 2004