leon 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/io.rb +2 -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 + 23)
226
+ v *= 2**(-log)
227
227
  if v.floor != v
228
228
  return Constants::DOUBLE
229
229
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: