Project

General

Profile

Actions

Bug #10989

closed

Complex Exponentiation

Added by keith__ng (Keith ng) about 9 years ago. Updated about 9 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]
[ruby-core:<unknown>]

Description

Hello, it looks a sort of bug to me, doesn't it?

ruby -e 'p (1i) ** (2.0)'
(-1.0+1.2246467991473532e-16i)
Actions #1

Updated by mrkn (Kenta Murata) about 9 years ago

  • Status changed from Open to Rejected

It's not a bug but just a floating point arithmetic error.

$ ruby -e 'p 1i ** 2'
(-1+0i)
Actions

Also available in: Atom PDF

Like0
Like0