[Python-Dev] trunc() (original) (raw)
Raymond Hettinger python at rcn.com
Fri Jan 25 20:50:56 CET 2008
- Previous message: [Python-Dev] trunc()
- Next message: [Python-Dev] trunc()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
.some pocket calculators have an INT function, defined as floor(x) when x is positive and ceil(x) when x is negative
That's the mathematical definition. The way they explain it is dirt simple: return the integer portion of a number.
Some of the calculators that have int() also have frac() which has the obvious interpretation.
Raymond
- Previous message: [Python-Dev] trunc()
- Next message: [Python-Dev] trunc()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]