mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
atof: remove extra() causing warnings
This commit is contained in:
parent
ea781a557f
commit
84f535d242
@ -301,7 +301,7 @@ fn parser(s string ) (int,PrepNumber) {
|
||||
|
||||
// reading sign of exponent
|
||||
FSM_G {
|
||||
if (c == PLUS) {
|
||||
if c == PLUS {
|
||||
c = s[i++]
|
||||
} else if c == MINUS {
|
||||
expneg = true
|
||||
@ -455,8 +455,8 @@ fn converter(pn mut PrepNumber) u64 {
|
||||
//C.printf("mantissa before normalization: %08x%08x%08x binexp: %d \n", s2,s1,s0,binexp)
|
||||
|
||||
// normalization, the 28 bit in s2 must the leftest one in the variable
|
||||
if (s2 != 0 || s1 != 0|| s0 != 0) {
|
||||
for ((s2 & mask28) == 0) {
|
||||
if s2 != 0 || s1 != 0|| s0 != 0 {
|
||||
for (s2 & mask28) == 0 {
|
||||
q2, q1, q0 = lsl96(s2, s1, s0)
|
||||
binexp--
|
||||
s2 = q2
|
||||
@ -520,7 +520,7 @@ fn converter(pn mut PrepNumber) u64 {
|
||||
}
|
||||
|
||||
// recheck normalization
|
||||
if (s2 & (mask28<<u32(1)) != 0 ) {
|
||||
if s2 & (mask28<<u32(1)) != 0 {
|
||||
//C.printf("Renormalize!!")
|
||||
q2, q1, q0 = lsr96(s2, s1, s0)
|
||||
binexp--
|
||||
@ -538,7 +538,7 @@ fn converter(pn mut PrepNumber) u64 {
|
||||
// offset the binary exponent IEEE 754
|
||||
binexp += 1023
|
||||
|
||||
if (binexp > 2046) {
|
||||
if binexp > 2046 {
|
||||
if pn.negative {
|
||||
result = DOUBLE_MINUS_INFINITY
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user