summaryrefslogtreecommitdiff
path: root/lib/cmath.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cmath.rb')
-rw-r--r--lib/cmath.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cmath.rb b/lib/cmath.rb
index 976f269299..3c94221f2c 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -79,7 +79,7 @@ module CMath
else
r = z.abs
x = z.real
- Complex(sqrt!((r + x) / 2), sqrt!((r - x) / 2))
+ Complex(sqrt!((r + x) / 2.0), sqrt!((r - x) / 2.0))
end
end
end