[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #7825] built-in versions of base2dec and d
From: |
Dan Sebald |
Subject: |
[Octave-patch-tracker] [patch #7825] built-in versions of base2dec and dec2base |
Date: |
Thu, 06 Sep 2012 21:45:11 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.6.24-1.fc14 Firefox/3.6.24 |
Follow-up Comment #3, patch #7825 (project octave):
Noting a discrepancy in behavior for the script-file based bin2dec and the
internal bin2dec
Internal wraps at 64-bit
octave:102>
bin2dec("111111111111111111111111111111111111111111111111111111111111111111111111")
ans = 255
Script-based doesn't wrap at 64-bit
octave:728>
bin2dec("111111111111111111111111111111111111111111111111111111111111111111111111")
ans = 4.7224e+21
The fix is simple: change base2dec_str_dbl_op () to actually return a dbl, as
it says, rather than a long unsigned int. I will update the patch later using
the new source reorganization.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?7825>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-patch-tracker] [patch #7825] built-in versions of base2dec and dec2base,
Dan Sebald <=