fixed an embarassing bug, X band 1 == 1 does not test whether X is even
This commit is contained in:
parent
8e21ab9145
commit
ab7f1c8353
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ float_to_decimal(Num) when is_float(Num) ->
|
|||
{F, E} = extract(<<Num:64/float>>),
|
||||
{R, S, MP, MM} = initial_vals(F, E),
|
||||
K = ceiling(math:log10(abs(Num)) - 1.0e-10),
|
||||
Round = F band 1 =:= 1,
|
||||
Round = F band 1 =:= 0,
|
||||
{Dpoint, Digits} = scale(R, S, MP, MM, K, Round),
|
||||
if Num >= 0 -> format(Dpoint, Digits)
|
||||
; Num < 0 -> "-" ++ format(Dpoint, Digits)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue