bridge/class-master/depend/pari/src/language/es.c
/* write a real 0 of exponent ex */
write a real 0 of exponent ex
write a real 0 of exponent ex
static char *
real0tostr(long ex, char format, char exp_char, long wanted_dec)
{
  char *buf, *buf0;
  if (format == 'f') {
    long width_frac = wanted_dec;
    if (width_frac < 0) width_frac = (ex >= 0)? 0: (long)(-ex * LOG10_2);
    return real0tostr_width_frac(width_frac);
  } else {
    buf0 = buf = stack_malloc(3 + MAX_EXPO_LEN + 1);
    *buf++ = '0';
    *buf++ = '.';
    *buf++ = exp_char;
    sprintf(buf, "%ld", ex10(ex) + 1);
  }
  return buf0;
}
static char * real0tostr ( long ex , char format , char exp_char , long wanted_dec ) { char * buf , * buf0 ; if ( format == ' ' ) { long width_frac = wanted_dec ; if ( width_frac < 0 ) width_frac = ( ex >= 0 ) ? 0 : ( long ) ( - ex * LOG10_2 ) ; return real0tostr_width_frac ( width_frac ) ; } else { buf0 = buf = stack_malloc ( 3 + MAX_EXPO_LEN + 1 ) ; * buf ++ = ' ' ; * buf ++ = ' ' ; * buf ++ = exp_char ; sprintf ( buf , " " , ex10 ( ex ) + 1 ) ; } return buf0 ; }
write a real 0 of exponent ex
write a real 0 of exponent ex