I apologize for not asking about this in the forum first but the forums
seem not to be working, and I am fairly certain that this is a bug.I also
do not know what this bug is actually a problem with: the typing or the
casting algorithm, (though they are probably closely related functions due
to Yorick's design).
When doing arithmetic on numbers that have been cast then casting them
again, the number does not cast properly. Below is a basic example of
this.
> x = 11.1
> ix = long(x)
> fx = x - ix
> ix
11
> fx
.1
> long(fx*10)
0
Where the output should be the same as:
> long(.1*10)
1
Nobody/Anonymous
None
None
Public
|
Date: 2009-09-19 16:35 This is a feature of floating point arithmetic, not a bug. You can try it |
|
Date: 2009-07-23 22:47 Upon further inspection, this problem seems to be caused by a discrepancy |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2009-09-19 16:35 | dhmunro |
| resolution_id | None | 2009-09-19 16:35 | dhmunro |
| allow_comments | 1 | 2009-09-19 16:35 | dhmunro |
| close_date | - | 2009-09-19 16:35 | dhmunro |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use