NathanZook / ruby_sqrt

Various algorithms considered for Integer#sqrt
1 stars 1 forks source link

Correct variable name error 'almost' in inverse_newton_sqrt; add -- r… #3

Closed jzakiya closed 7 years ago

jzakiya commented 7 years ago

…equire 'benchmark/ips'

In original inverse_newton_sqrt variable almost not defined/initialized. Corrected it, and renamed variable result to root to make it clearer what it is, and added -- require 'benchmark/ips so file would always insure that gem is loaded before benchmark is run.