Rev 266 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 266 | Rev 276 | ||
---|---|---|---|
Line 67... | Line 67... | ||
67 | } |
67 | } |
68 | 68 | ||
69 | if ((modifier=='E')||(modifier=='e')) { |
69 | if ((modifier=='E')||(modifier=='e')) { |
70 | intval2=fmath_fint(fmath_get_decimal_exponent(num),&intval); |
70 | intval2=fmath_fint(fmath_get_decimal_exponent(num),&intval); |
71 | exponent=intval; |
71 | exponent=intval; |
72 | if ((intval2<0.0)&&(exponent<0)) exponent--; |
72 | if ((intval2<0.0)) exponent--; |
73 | num = num / ((fmath_dpow(10.0,exponent))); |
73 | num = num / ((fmath_dpow(10.0,exponent))); |
74 | 74 | ||
75 | print_double(num,modifier+1,precision); //modifier+1 = E => F or e => f |
75 | print_double(num,modifier+1,precision); //modifier+1 = E => F or e => f |
76 | putchar(modifier); |
76 | putchar(modifier); |
77 | if (exponent<0) { |
77 | if (exponent<0) { |
Line 117... | Line 117... | ||
117 | counter++; |
117 | counter++; |
118 | } else { |
118 | } else { |
119 | counter=0; |
119 | counter=0; |
120 | } |
120 | } |
121 | 121 | ||
- | 122 | in1=intval; |
|
122 | if (intval==0.0) { |
123 | if (in1==0.0) { |
123 | if (counter<DEFAULT_DOUBLE_BUFFER_SIZE) buf[counter++]='0'; |
124 | if (counter<DEFAULT_DOUBLE_BUFFER_SIZE) buf[counter++]='0'; |
124 | } else { |
125 | } else { |
125 | in1=intval; |
- | |
126 | while(( in1>0 )&&(counter<DEFAULT_DOUBLE_BUFFER_SIZE)) { |
126 | while(( in1>0 )&&(counter<DEFAULT_DOUBLE_BUFFER_SIZE)) { |
127 | 127 | ||
128 | in2=in1; |
128 | in2=in1; |
129 | in1/=10; |
129 | in1/=10; |
130 | buf[counter]=in2-in1*10 + '0'; |
130 | buf[counter]=in2-in1*10 + '0'; |