[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithm
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only) |
Date: |
Mon, 18 Nov 2013 22:14:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130917 Firefox/17.0 Iceweasel/17.0.9 |
Follow-up Comment #17, bug #40607 (project octave):
I made the attached changes to try to diagnose why there is a difference
between the GUI and CLI versions.
When I run it on my Windows system, I see the following results with the GUI
version:
>> int64(2)^63-1
value: 2
rvalue: 2
cast value: 2
value: 9223372036854775808
thmax: 9223372036854774784
op: -
tx: 9223372036854775807
y: 1
tr: 9223372036854775808
value: 9223372036854775808
thmax: 9223372036854775807
ans = 9223372036854775807
I fail to understand how tr can be the result of tx - y. The operator is
clearly subtraction, so the result should be one less than tx. But given the
incorrect value of tx - y, the result is truncated back to the max value for
int64.
Here's the result for the CLI version:
octave-cli.exe:1> int64(2)^63-1
value: 2
rvalue: 2
cast value: 2
value: 9223372036854775808
thmax: 9223372036854774784
op: -
tx: 9223372036854775807
y: 1
tr: 9223372036854775806
value: 9223372036854775806
rvalue: 9223372036854775806
cast value: 9223372036854775806
ans = 9223372036854775806
This result is what I expect -- you know, when you subtract one from a value,
you get a value that is one less...
This also confirms that these operations are performed using long double on
Windows systems.
How can long double operations be broken only when linking with the GUI
libraries?
(file #29653)
_______________________________________________________
Additional Item Attachment:
File name: diffs.txt Size:2 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40607>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, (continued)
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, Philip Nienhuis, 2013/11/17
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, John Donoghue, 2013/11/17
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, John Donoghue, 2013/11/17
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, Philip Nienhuis, 2013/11/18
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, John Donoghue, 2013/11/18
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, Rik, 2013/11/18
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, John Donoghue, 2013/11/18
- [Octave-bug-tracker] [bug #40607] mxe-octave: 3.7.7+ test dec2base fails, Rik, 2013/11/18
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), Rik, 2013/11/18
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), Michael Godfrey, 2013/11/18
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only),
John W. Eaton <=
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), John W. Eaton, 2013/11/18
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), John W. Eaton, 2013/11/19
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), John W. Eaton, 2013/11/19
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), John W. Eaton, 2013/11/19
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), Michael Godfrey, 2013/11/19
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), Michael Godfrey, 2013/11/19
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), Rik, 2013/11/19
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), John W. Eaton, 2013/11/21
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), John Donoghue, 2013/11/22
- [Octave-bug-tracker] [bug #40607] mxe-octave: mixed uint64/double arithmetic incorrect (GUI-only), Mike Miller, 2013/11/22