Re: Negative Zero (was Re: Rfd: floating point truncation)
- From: "Ed" <nospam@xxxxxxxxxxx>
- Date: Tue, 21 Apr 2009 19:37:02 +1000
David N. Williams wrote:
Marcel Hendrix wrote:
> I wrote:
>
>> S" -0" >FLOAT drop -0e 0e F~ . should return -1. Do all Forth's do this?
>> Do all standard Forths return -1 in case of evaluating -0e -0e 0e F~ ?
>
> Hmm, of course they all will, even when they're wrong :-)
>
> Please fix with system-dependent magic before answering.
:-)
A slightly different issue:
pfe:
0e -0e 0e F~ . 0 ok
0e f. -0.000000 ok
gforth:
0e -0e 0e F~ . 0 ok
-0e f. 0. ok
So not all systems that understand -0e internally also print it.
This is not uncommon. VFX and SwiftForth both do this.
So how should such systems be classified? Do they support
negative zero - or not? Ostensibly they don't, but F~ and
the real to IEEE conversion functions may say otherwise.
.
- References:
- Re: Negative Zero (was Re: Rfd: floating point truncation)
- From: Marcel Hendrix
- Re: Negative Zero (was Re: Rfd: floating point truncation)
- From: Marcel Hendrix
- Re: Negative Zero (was Re: Rfd: floating point truncation)
- From: David N. Williams
- Re: Negative Zero (was Re: Rfd: floating point truncation)
- Prev by Date: Re: Applications for SEAForth Re: More Chuck news
- Next by Date: ANN Neon+ v2.0
- Previous by thread: Re: Negative Zero (was Re: Rfd: floating point truncation)
- Next by thread: Re: Negative Zero (was Re: Rfd: floating point truncation)
- Index(es):
Relevant Pages
|