1. Peculiar IEEE Bug... (v2.0)

I don't know whether the following applies to the new v2.1...

I was messing around with [my] mathbag.e last night, and discovered
something interesting:

atom ieee
ieee = -1e-308
? ieee < 0
? ieee = 0
? ieee > 0

Result when run:
0
0
1

Should have returned:
1
0
0

Something funny going on here...
This also applies to -2e-308. -3e-308 works right. (So I'm using it. :) )

Is it the Interpreter, Watcom C, the IEEE standard, or is my PII-233
playing up?  /me looks worried about the latter...

On a similar note; Now that Euphoria has moved in the direction of '+='
operators, is there any chance of adding 'e-' and 'e+' as operators in the
language, and making 'E+' and 'E-' still stand for the original meaning
(or vice-versa).

Then things like this become possible:

atom a
integer powr

powr = 42
a = 3.14e+powr -- rather than a = 3.14 * power(10, powr)

Granted it's fairly trivial to write this function:

function e_(atom num, integer pten)
    return num * power(10, pten)
end function

a = e_(3.14, powr)

But I just think making 'e-' and 'e+' operators is really elegant...

/me ducks and waits for Jiri, ;)
Carl

PS 2nd 1/2 of this post is AIMHO...
PPS Has anyone heard about the Pentium III? Freaky...

--
Carl R White -- Final Year Computer Science at the University of Bradford
E-mail........: cyrek- at -bigfoot.com -- Remove hyphens. Ta :)
URL...........: http://www.bigfoot.com/~cyrek/
Uncrackable...: "19.6A.23.38.52.73.45 25.31.1C 3C.53.44.39.58"

new topic     » topic index » view message » categorize

2. Re: Peculiar IEEE Bug... (v2.0)

>PPS Has anyone heard about the Pentium III? Freaky...

To be released on March. It's just a Xeon with name change. I've heard that
AMD's K7 will kick it's ass... time will say ;)


Regards,
        Daniel   Berstein
        daber at pair.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: Peculiar IEEE Bug... (v2.0)

Some PIII are already sold:
see http://www.news.com/News/Item/0,4,31785,00.html
 ----------
From: Daniel Berstein
To: EUPHORIA at LISTSERV.MUOHIO.EDU
Subject: Re: Peculiar IEEE Bug... (v2.0)
Date: Thursday 11 February 1999 17:57

>PPS Has anyone heard about the Pentium III? Freaky...

To be released on March. It's just a Xeon with name change. I've heard that
AMD's K7 will kick it's ass... time will say ;)


Regards,
        Daniel   Berstein
        daber at pair.com

new topic     » goto parent     » topic index » view message » categorize

4. Re: Peculiar IEEE Bug... (v2.0)

They had to change the name....They f^%$ed up on the design

and i quote CNET


"Microsoft's Windows operating systems will not properly recognize
Intel's upcoming high-speed Pentium III processor, the companies have
confirmed, although the upgrade glitch is not expected to cause any
performance problems."

I also heard something about it not working in quad cpu
systems....Anyone kow more about that????

The Grape Vine




>Date:         Thu, 11 Feb 1999 12:57:12 -0400
>Reply-To:     Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
>From:         Daniel Berstein <daber at PAIR.COM>
>Subject:      Re: Peculiar IEEE Bug... (v2.0)
>To:           EUPHORIA at LISTSERV.MUOHIO.EDU
>
>>PPS Has anyone heard about the Pentium III? Freaky...
>
>To be released on March. It's just a Xeon with name change. I've heard
that
>AMD's K7 will kick it's ass... time will say ;)
>
>
>Regards,
>        Daniel   Berstein
>        daber at pair.com


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

5. Re: Peculiar IEEE Bug... (v2.0)

>They had to change the name....They f^%$ed up on the design
>
>and i quote CNET
>
>
>"Microsoft's Windows operating systems will not properly recognize
>Intel's upcoming high-speed Pentium III processor, the companies have
>confirmed, although the upgrade glitch is not expected to cause any
>performance problems."
>
>I also heard something about it not working in quad cpu
>systems....Anyone kow more about that????

All I know is that Intel broke (again) it promise of consistent expandable
platform. Pentium III will use a Slot-2 design not compatible to PII and
Celeron's Slot-1.

About your quote.. mmmhh... there are Xeon (450mhz) high-end servers
available and surely run NT.


Regards,
        Daniel   Berstein
        daber at pair.com

new topic     » goto parent     » topic index » view message » categorize

6. Re: Peculiar IEEE Bug... (v2.0)

> Carl R White writes:
> atom ieee
> ieee = -1e-308
> ? ieee < 0
> ? ieee = 0
> ? ieee > 0

> Result when run:
> 0
> 0
> 1

> Should have returned:
> 1
> 0
> 0

> Something funny going on here...
> This also applies to -2e-308.
> -3e-308 works right. (So I'm using it. :)

I get the same results. I looked at what goes on inside
the Euphoria interpreter in this case, but I couldn't see
anything suspicious, so I dragged out my IEEE information from Intel,
and found that -1e-308 and -2e-308 are so-called "de-normalized"
floating-point numbers, whereas -3e-308 is a "normalized" number.
The IEEE 64-bit format supports numbers from +/-
2.23e-308 to 1.79e+308 as *normalized* numbers. It also
supports numbers slightly outside of this range as *de-normalized*
numbers. When you are working with denormalized numbers you
are in the "twilight zone" of floating-point calculations. Inaccuracies
are very likely to occur, although I don't understand why it can't
at least tell the difference between positive and negative.

Regards,
     Rob Craig
     Rapid Deployment Software
     http://members.aol.com/FilesEu/

new topic     » goto parent     » topic index » view message » categorize

7. Re: Peculiar IEEE Bug... (v2.0)

Yes there is but when used in a quad cpu configuration it can crash..
Ill try and find the url i saw this at...

>Date:         Thu, 11 Feb 1999 16:01:55 -0400
>Reply-To:     Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
>From:         Daniel Berstein <daber at PAIR.COM>
>Subject:      Re: Peculiar IEEE Bug... (v2.0)
>To:           EUPHORIA at LISTSERV.MUOHIO.EDU
>
>>They had to change the name....They f^%$ed up on the design
>>
>>and i quote CNET
>>
>>
>>"Microsoft's Windows operating systems will not properly recognize
>>Intel's upcoming high-speed Pentium III processor, the companies have
>>confirmed, although the upgrade glitch is not expected to cause any
>>performance problems."
>>
>>I also heard something about it not working in quad cpu
>>systems....Anyone kow more about that????
>
>All I know is that Intel broke (again) it promise of consistent
expandable
>platform. Pentium III will use a Slot-2 design not compatible to PII
and
>Celeron's Slot-1.
>
>About your quote.. mmmhh... there are Xeon (450mhz) high-end servers
>available and surely run NT.
>
>
>Regards,
>        Daniel   Berstein
>        daber at pair.com
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

8. Re: Peculiar IEEE Bug... (v2.0)

>I get the same results. I looked at what goes on inside
>the Euphoria interpreter in this case, but I couldn't see
>anything suspicious, so I dragged out my IEEE information from Intel,
>and found that -1e-308 and -2e-308 are so-called "de-normalized"
>floating-point numbers, whereas -3e-308 is a "normalized" number.
>The IEEE 64-bit format supports numbers from +/-
>2.23e-308 to 1.79e+308 as *normalized* numbers. It also
>supports numbers slightly outside of this range as *de-normalized*
>numbers. When you are working with denormalized numbers you
>are in the "twilight zone" of floating-point calculations. Inaccuracies
>are very likely to occur, although I don't understand why it can't
>at least tell the difference between positive and negative.

If anyone is interested on the IEEE floating point issue, more information
about the standard and it's implementation can be found at:

comp_guide/index.html

I wonder if there is an ISO standard about floating point arithmetics.

BTW The IEEE standard is n=BA 754

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu