$ irb -rcmath irb(main):001:0> include CMath => Object irb(main):002:0> left_euler = exp(-1.0*sqrt(-1.0)*PI) => (-1.0-1.2246063538223773e-16i) irb(main):003:0> right_euler = cos(PI) + sqrt(-1.0) * sin(PI) => (-1.0+1.2246063538223773e-16i) irb(main):004:0> left_euler == right_euler => false irb(main):005:0> left_euler === right_euler => false

(check also phosphorescence: Euler's formula in Ruby)

## No comments:

## Post a Comment