source: project/release/5/srfi-19/trunk/C_double_to_number.incl @ 38082

Last change on this file since 38082 was 38082, checked in by Kon Lovett, 5 weeks ago

C5 port

File size: 415 bytes
Line 
1
2#>
3#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__cplusplus)
4# define C_inline                  inline static
5#else
6# define C_inline                  static
7#endif
8
9C_word C_double_to_number(C_word n)
10{
11  double m, f = C_flonum_magnitude(n);
12
13  if(f <= (double)C_MOST_POSITIVE_FIXNUM
14     && f >= (double)C_MOST_NEGATIVE_FIXNUM && C_modf(f, &m) == 0.0)
15    return C_fix(f);
16  else return n;
17}
18<#
Note: See TracBrowser for help on using the repository browser.