[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: imag () function detail regarding -0.0000
From: |
John W. Eaton |
Subject: |
Re: imag () function detail regarding -0.0000 |
Date: |
Wed, 12 Sep 2012 03:51:47 -0400 |
On 11-Sep-2012, Daniel J Sebald wrote:
| Well, not in this case, no, unless one wants to think of rounding to
| zero from the negative direction. But I prefer the single additive
| identity rule of a field in the case of computations.
|
| I would think the CPU naturally doesn't use -0 for multiplies if it is
| following some standard, unless there is some configuration (compile
| option?) saying to maintain sign through multiplication by zero. I'm
| guessing Octave is implementing the rule.
I don't think we should change Octave so that the '-' is not
displayed, and I would definitely be against checking for and dropping
the sign of zero every time we do some computation. If -0 can be
generated, it should be displayed. Consider things like
1/(1/-Inf)
if you drop the - from (1/-Inf) == -0, this expression would result in
Inf -- how does that make sense? If you decide to not display it (as
Matlab does) then things become somewhat confusing if you break the
expression into parts and evaluate them separately: x = 1/-Inf
produces -0 but it is displayed as 0, so you think, OK, I have 0.
Then you use that result in the expression 1/x and you get -Inf.
What?
jwe
- imag () function detail regarding -0.0000, Daniel J Sebald, 2012/09/11
- Re: imag () function detail regarding -0.0000, Jordi GutiƩrrez Hermoso, 2012/09/11
- Re: imag () function detail regarding -0.0000, Daniel J Sebald, 2012/09/11
- Re: imag () function detail regarding -0.0000, Michael D Godfrey, 2012/09/11
- Re: imag () function detail regarding -0.0000, Max Brister, 2012/09/11
- Re: imag () function detail regarding -0.0000, Michael D Godfrey, 2012/09/11
- Re: imag () function detail regarding -0.0000, Michael D Godfrey, 2012/09/11
- Re: imag () function detail regarding -0.0000, Daniel J Sebald, 2012/09/11
- Re: imag () function detail regarding -0.0000,
John W. Eaton <=
- Re: imag () function detail regarding -0.0000, Michael D Godfrey, 2012/09/12
- Re: imag () function detail regarding -0.0000, John W. Eaton, 2012/09/12
- Re: imag () function detail regarding -0.0000, Michael D Godfrey, 2012/09/12
- Re: imag () function detail regarding -0.0000, Philip Nienhuis, 2012/09/12
- Re: imag () function detail regarding -0.0000, Michael D Godfrey, 2012/09/12
- OT: ML2012b [WAS: Re: imag () function detail regarding -0.0000], Philip Nienhuis, 2012/09/12
- Re: OT: ML2012b [WAS: Re: imag () function detail regarding -0.0000], Jordi GutiƩrrez Hermoso, 2012/09/13
- Re: imag () function detail regarding -0.0000, Daniel J Sebald, 2012/09/12
- Re: imag () function detail regarding -0.0000, Dmitri A. Sergatskov, 2012/09/12
- Re: imag () function detail regarding -0.0000, Daniel J Sebald, 2012/09/12