a3e6692666d0750cf7cd54435223018c20f126e1
1 /* this file is #include'd (several times) by numbers.c */
4 NUM2FLOAT (SCM num
, unsigned long int pos
, const char *s_caller
)
8 else if (SCM_BIGP (num
))
14 for (l
= SCM_NUMDIGS (num
); l
--;)
15 res
= SCM_BIGRAD
* res
+ SCM_BDIGITS (num
)[l
];
17 if (SCM_BIGSIGN (num
))
23 scm_out_of_range (s_caller
, num
);
25 else if (SCM_REALP (num
))
26 return SCM_REAL_VALUE (num
);
28 scm_wrong_type_arg (s_caller
, pos
, num
);
35 z
= scm_alloc_double_cell (scm_tc16_real
, 0, 0, 0);
36 SCM_REAL_VALUE (z
) = n
;