| Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 1 | /* Float object interface */ |
| 2 | |||||
| 3 | /* | ||||
| 4 | floatobject represents a (double precision) floating point number. | ||||
| 5 | */ | ||||
| 6 | |||||
| 7 | typedef struct { | ||||
| 8 | OB_HEAD | ||||
| 9 | double ob_fval; | ||||
| 10 | } floatobject; | ||||
| 11 | |||||
| 12 | extern typeobject Floattype; | ||||
| 13 | |||||
| 14 | #define is_floatobject(op) ((op)->ob_type == &Floattype) | ||||
| 15 | |||||
| 16 | extern object *newfloatobject PROTO((double)); | ||||
| 17 | extern double getfloatvalue PROTO((object *)); | ||||
| 18 | |||||
| 19 | /* Macro, trading safety for speed */ | ||||
| 20 | #define GETFLOATVALUE(op) ((op)->ob_fval) | ||||