/[guile]/guile/guile-core/libguile/numbers.c
ViewVC logotype

Diff of /guile/guile-core/libguile/numbers.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.207 by mvo, Tue Nov 18 19:59:51 2003 UTC revision 1.208 by mvo, Wed Nov 19 02:19:03 2003 UTC
# Line 2325  mem2decimal_from_point (SCM result, cons Line 2325  mem2decimal_from_point (SCM result, cons
2325            result = scm_sum (result, SCM_MAKINUM (add));            result = scm_sum (result, SCM_MAKINUM (add));
2326          }          }
2327    
2328        result = scm_divide2real (result, big_shift);        result = scm_divide (result, big_shift);
2329    
2330        /* We've seen a decimal point, thus the value is implicitly inexact. */        /* We've seen a decimal point, thus the value is implicitly inexact. */
2331        x = INEXACT;        x = INEXACT;
# Line 2438  mem2ureal (const char* mem, size_t len, Line 2438  mem2ureal (const char* mem, size_t len,
2438      {      {
2439        enum t_exactness x = EXACT;        enum t_exactness x = EXACT;
2440    
2441        /* Cobble up the fraction.  We might want to set the NaN's        /* Cobble up the fractional part.  We might want to set the
2442           mantissa from it. */           NaN's mantissa from it. */
2443        idx += 4;        idx += 4;
2444        mem2uinteger (mem, len, &idx, 10, &x);        mem2uinteger (mem, len, &idx, 10, &x);
2445        *p_idx = idx;        *p_idx = idx;
# Line 2714  scm_i_mem2number (const char* mem, size_ Line 2714  scm_i_mem2number (const char* mem, size_
2714      {      {
2715      case EXACT:      case EXACT:
2716        if (SCM_INEXACTP (result))        if (SCM_INEXACTP (result))
         /* FIXME: This may change the value. */  
2717          return scm_inexact_to_exact (result);          return scm_inexact_to_exact (result);
2718        else        else
2719          return result;          return result;
# Line 2755  SCM_DEFINE (scm_string_to_number, "strin Line 2754  SCM_DEFINE (scm_string_to_number, "strin
2754    SCM_VALIDATE_STRING (1, string);    SCM_VALIDATE_STRING (1, string);
2755    SCM_VALIDATE_INUM_MIN_DEF_COPY (2, radix,2,10, base);    SCM_VALIDATE_INUM_MIN_DEF_COPY (2, radix,2,10, base);
2756    answer = scm_i_mem2number (SCM_STRING_CHARS (string),    answer = scm_i_mem2number (SCM_STRING_CHARS (string),
2757                             SCM_STRING_LENGTH (string),                               SCM_STRING_LENGTH (string),
2758                             base);                               base);
2759    return scm_return_first (answer, string);    return scm_return_first (answer, string);
2760  }  }
2761  #undef FUNC_NAME  #undef FUNC_NAME

Legend:
Removed from v.1.207  
changed lines
  Added in v.1.208

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26