leon 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/io.rb +2 -2
- metadata +1 -1
data/lib/io.rb
CHANGED
@@ -214,7 +214,7 @@ module LEON
|
|
214
214
|
return Constants::DOUBLE
|
215
215
|
elsif v.is_a? Float
|
216
216
|
v = v.abs
|
217
|
-
log = Math::log(v)/Math::log(2)
|
217
|
+
log = Math::log(v)/Math::log(2) - 23
|
218
218
|
if log < -128 or log > 127
|
219
219
|
return Constants::DOUBLE
|
220
220
|
end
|
@@ -223,7 +223,7 @@ module LEON
|
|
223
223
|
else
|
224
224
|
log = log.floor
|
225
225
|
end
|
226
|
-
v *= 2**(-log
|
226
|
+
v *= 2**(-log)
|
227
227
|
if v.floor != v
|
228
228
|
return Constants::DOUBLE
|
229
229
|
end
|