[8.6.1] More floating point oddities (?)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[8.6.1] More floating point oddities (?)

Richard Sargent
Administrator
(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have, but resulting in a system crash!
(Unhandled exception at 0x62ddf4ae (esvm40.dll) in abt.exe: 0x80000026: a long jump has been executed.) [According to VisualStudio 2010]

(971 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(970 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [8.6.1] More floating point oddities (?)

Richard Sargent
Administrator
The second example of (1023 to: 971 by: -1) should have been (1023 to: 970 by: -1).
The resulting last iteration should have been two small to affect the result, so should not have overflowed. (Of course, it might have affected extended bits in the math processor which would have wanted to round the resulting 64-bit value.)


On Tue, May 26, 2015 at 1:45 PM, Richard Sargent <[hidden email]> wrote:
(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have, but resulting in a system crash!
(Unhandled exception at 0x62ddf4ae (esvm40.dll) in abt.exe: 0x80000026: a long jump has been executed.) [According to VisualStudio 2010]

(971 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(970 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have.

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [8.6.1] More floating point oddities (?)

Seth Berman
Hi Richard,

Some other vm guys are looking into this...they were able to reproduce this but only on Win7 64-bit....is this what you are running?

-- Seth

On Tuesday, May 26, 2015 at 4:58:02 PM UTC-4, Richard Sargent wrote:
The second example of (1023 to: 971 by: -1) should have been (1023 to: 970 by: -1).
The resulting last iteration should have been two small to affect the result, so should not have overflowed. (Of course, it might have affected extended bits in the math processor which would have wanted to round the resulting 64-bit value.)


On Tue, May 26, 2015 at 1:45 PM, Richard Sargent <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="DaukWdchlFkJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">richard...@gemtalksystems.com> wrote:
(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have, but resulting in a system crash!
(Unhandled exception at 0x62ddf4ae (esvm40.dll) in abt.exe: 0x80000026: a long jump has been executed.) [According to VisualStudio 2010]

(971 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(970 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have.

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe';return true;">https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="DaukWdchlFkJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">va-smalltalk...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="DaukWdchlFkJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">va-sma...@....
Visit this group at <a href="http://groups.google.com/group/va-smalltalk" target="_blank" rel="nofollow" onmousedown="this.href='http://groups.google.com/group/va-smalltalk';return true;" onclick="this.href='http://groups.google.com/group/va-smalltalk';return true;">http://groups.google.com/group/va-smalltalk.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [8.6.1] More floating point oddities (?)

Richard Sargent
Administrator
On Thursday, May 28, 2015 at 8:32:59 AM UTC-7, Seth Berman wrote:
Hi Richard,

Some other vm guys are looking into this...they were able to reproduce this but only on Win7 64-bit....is this what you are running?

Oddly enough, Windows 7 Enterprise 64-bit. :-)
Why is this no surprise?

My hypothesis is that the computation that works can be expressed in 64 bits, but one more iteration requires 65 bits. I believe hardware FP uses 80 bits? So, I suspect a rounding scenario, triggering an overflow.

fmax: ........ 7F EF FF FF FF FF FF FF [00 00]
2.0^970: ..... 7F E0 00 00 00 00 00 00 [80 00] (guessing)
Sum: .........
7F EF FF FF FF FF FF FF [80 00] (guessing)
Rounded: ..... 7F F0 00 00 00 00 00 00 (+Inf)


-- Seth

On Tuesday, May 26, 2015 at 4:58:02 PM UTC-4, Richard Sargent wrote:
The second example of (1023 to: 971 by: -1) should have been (1023 to: 970 by: -1).
The resulting last iteration should have been two small to affect the result, so should not have overflowed. (Of course, it might have affected extended bits in the math processor which would have wanted to round the resulting 64-bit value.)


On Tue, May 26, 2015 at 1:45 PM, Richard Sargent <[hidden email]> wrote:
(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have, but resulting in a system crash!
(Unhandled exception at 0x62ddf4ae (esvm40.dll) in abt.exe: 0x80000026: a long jump has been executed.) [According to VisualStudio 2010]

(971 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(970 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have.

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe';return true;">https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to va-smalltalk...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/va-smalltalk" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/va-smalltalk';return true;" onclick="this.href='http://groups.google.com/group/va-smalltalk';return true;">http://groups.google.com/group/va-smalltalk.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [8.6.1] More floating point oddities (?)

Seth Berman
Hi Richard,

Yes, we can look into the exact reason of the overflow...it may be as you suggest.  We see that the exception is triggered in EsScanner>>readNumber during a multiplication on fmax.
This is reproducible on all the windows platforms.  But the situation where the image hangs and crashes is only seen on Win7 64-bit at the moment...so we are working to understand that one.
Thanks!

-- Seth

On Thursday, May 28, 2015 at 11:49:16 AM UTC-4, Richard Sargent wrote:
On Thursday, May 28, 2015 at 8:32:59 AM UTC-7, Seth Berman wrote:
Hi Richard,

Some other vm guys are looking into this...they were able to reproduce this but only on Win7 64-bit....is this what you are running?

Oddly enough, Windows 7 Enterprise 64-bit. :-)
Why is this no surprise?

My hypothesis is that the computation that works can be expressed in 64 bits, but one more iteration requires 65 bits. I believe hardware FP uses 80 bits? So, I suspect a rounding scenario, triggering an overflow.

fmax: ........ 7F EF FF FF FF FF FF FF [00 00]
2.0^970: ..... 7F E0 00 00 00 00 00 00 [80 00] (guessing)
Sum: .........
7F EF FF FF FF FF FF FF [80 00] (guessing)
Rounded: ..... 7F F0 00 00 00 00 00 00 (+Inf)


-- Seth

On Tuesday, May 26, 2015 at 4:58:02 PM UTC-4, Richard Sargent wrote:
The second example of (1023 to: 971 by: -1) should have been (1023 to: 970 by: -1).
The resulting last iteration should have been two small to affect the result, so should not have overflowed. (Of course, it might have affected extended bits in the math processor which would have wanted to round the resulting 64-bit value.)


On Tue, May 26, 2015 at 1:45 PM, Richard Sargent <[hidden email]> wrote:
(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(1023 to: 971 by: -1) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have, but resulting in a system crash!
(Unhandled exception at 0x62ddf4ae (esvm40.dll) in abt.exe: 0x80000026: a long jump has been executed.) [According to VisualStudio 2010]

(971 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> 16r7FEFFFFFFFFFFFFF (Float fmax)

(970 to: 1023) inject: 0.0 into: [:sum :power | sum + (2.0 raisedTo: power)]
===> Floating point overflow, which probably shouldn't have.

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe';return true;">https://groups.google.com/d/topic/va-smalltalk/LDmrGw8Y8DM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to va-smalltalk...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/va-smalltalk" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/va-smalltalk';return true;" onclick="this.href='http://groups.google.com/group/va-smalltalk';return true;">http://groups.google.com/group/va-smalltalk.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.