Message32604
| Author |
aryx |
| Recipients |
| Date |
2007年08月09日.15:09:54 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Hey Daniel,
The bigger issue for us is mostly the fact that Decimal.__hash__ us calling Decimal.__int__ and not because we want an integer/long version of a very large Decimal. We do not actually cast the decimal into an int/long explicitly. I wouldn't have any issues if Decimal.__int__ remained as it is, but I think it would be a good idea for Decimal.__hash__ to do something differently. Probably something that is fast and simple, such as hash( self.as_tuple() ), self being a Decimal of course.
Our project is a CAS and we use Decimal for our real number class. I happened to run into this issue when I was implementing approximation of log(x) for extremely large/small values of x. I just started keyboard bashing numbers and behold, Decimal crashed on me :) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 14:59:06 | admin | link | issue1770416 messages |
| 2007年08月23日 14:59:06 | admin | create |
|