Skip to content

Segmentation fault when applying ** to a complex number

Rising a negative complex number to a power using ** in ghci causes a segmentation fault:

$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +Data.Complex 
Prelude Data.Complex> (-1) ** 1 :: Complex Double 
Segmentation fault
Edited by Thomas Miedema
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information