test_fp.py 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671
  1. """
  2. Easy-to-use test-generating code:
  3. cases = '''
  4. exp 2.25
  5. log 2.25
  6. '''
  7. from mpmath import *
  8. mp.dps = 20
  9. for test in cases.splitlines():
  10. if not test:
  11. continue
  12. words = test.split()
  13. fname = words[0]
  14. args = words[1:]
  15. argstr = ", ".join(args)
  16. testline = "%s(%s)" % (fname, argstr)
  17. ans = str(eval(testline))
  18. print " assert ae(fp.%s, %s)" % (testline, ans)
  19. """
  20. from mpmath import fp
  21. def ae(x, y, tol=1e-12):
  22. if x == y:
  23. return True
  24. return abs(x-y) <= tol*abs(y)
  25. def test_conj():
  26. assert fp.conj(4) == 4
  27. assert fp.conj(3+4j) == 3-4j
  28. assert fp.fdot([1,2],[3,2+1j], conjugate=True) == 7-2j
  29. def test_fp_number_parts():
  30. assert ae(fp.arg(3), 0.0)
  31. assert ae(fp.arg(-3), 3.1415926535897932385)
  32. assert ae(fp.arg(3j), 1.5707963267948966192)
  33. assert ae(fp.arg(-3j), -1.5707963267948966192)
  34. assert ae(fp.arg(2+3j), 0.98279372324732906799)
  35. assert ae(fp.arg(-1-1j), -2.3561944901923449288)
  36. assert ae(fp.re(2.5), 2.5)
  37. assert ae(fp.re(2.5+3j), 2.5)
  38. assert ae(fp.im(2.5), 0.0)
  39. assert ae(fp.im(2.5+3j), 3.0)
  40. assert ae(fp.floor(2.5), 2.0)
  41. assert ae(fp.floor(2), 2.0)
  42. assert ae(fp.floor(2.0+0j), (2.0 + 0.0j))
  43. assert ae(fp.floor(-1.5-0.5j), (-2.0 - 1.0j))
  44. assert ae(fp.ceil(2.5), 3.0)
  45. assert ae(fp.ceil(2), 2.0)
  46. assert ae(fp.ceil(2.0+0j), (2.0 + 0.0j))
  47. assert ae(fp.ceil(-1.5-0.5j), (-1.0 + 0.0j))
  48. def test_fp_cospi_sinpi():
  49. assert ae(fp.sinpi(0), 0.0)
  50. assert ae(fp.sinpi(0.25), 0.7071067811865475244)
  51. assert ae(fp.sinpi(0.5), 1.0)
  52. assert ae(fp.sinpi(0.75), 0.7071067811865475244)
  53. assert ae(fp.sinpi(1), 0.0)
  54. assert ae(fp.sinpi(1.25), -0.7071067811865475244)
  55. assert ae(fp.sinpi(1.5), -1.0)
  56. assert ae(fp.sinpi(1.75), -0.7071067811865475244)
  57. assert ae(fp.sinpi(2), 0.0)
  58. assert ae(fp.sinpi(2.25), 0.7071067811865475244)
  59. assert ae(fp.sinpi(0+3j), (0.0 + 6195.8238636085899556j))
  60. assert ae(fp.sinpi(0.25+3j), (4381.1091260582448033 + 4381.1090689950686908j))
  61. assert ae(fp.sinpi(0.5+3j), (6195.8239443081075259 + 0.0j))
  62. assert ae(fp.sinpi(0.75+3j), (4381.1091260582448033 - 4381.1090689950686908j))
  63. assert ae(fp.sinpi(1+3j), (0.0 - 6195.8238636085899556j))
  64. assert ae(fp.sinpi(1.25+3j), (-4381.1091260582448033 - 4381.1090689950686908j))
  65. assert ae(fp.sinpi(1.5+3j), (-6195.8239443081075259 + 0.0j))
  66. assert ae(fp.sinpi(1.75+3j), (-4381.1091260582448033 + 4381.1090689950686908j))
  67. assert ae(fp.sinpi(2+3j), (0.0 + 6195.8238636085899556j))
  68. assert ae(fp.sinpi(2.25+3j), (4381.1091260582448033 + 4381.1090689950686908j))
  69. assert ae(fp.sinpi(-0.75), -0.7071067811865475244)
  70. assert ae(fp.sinpi(-1e-10), -3.1415926535897933529e-10)
  71. assert ae(fp.sinpi(1e-10), 3.1415926535897933529e-10)
  72. assert ae(fp.sinpi(1e-10+1e-10j), (3.141592653589793353e-10 + 3.1415926535897933528e-10j))
  73. assert ae(fp.sinpi(1e-10-1e-10j), (3.141592653589793353e-10 - 3.1415926535897933528e-10j))
  74. assert ae(fp.sinpi(-1e-10+1e-10j), (-3.141592653589793353e-10 + 3.1415926535897933528e-10j))
  75. assert ae(fp.sinpi(-1e-10-1e-10j), (-3.141592653589793353e-10 - 3.1415926535897933528e-10j))
  76. assert ae(fp.cospi(0), 1.0)
  77. assert ae(fp.cospi(0.25), 0.7071067811865475244)
  78. assert ae(fp.cospi(0.5), 0.0)
  79. assert ae(fp.cospi(0.75), -0.7071067811865475244)
  80. assert ae(fp.cospi(1), -1.0)
  81. assert ae(fp.cospi(1.25), -0.7071067811865475244)
  82. assert ae(fp.cospi(1.5), 0.0)
  83. assert ae(fp.cospi(1.75), 0.7071067811865475244)
  84. assert ae(fp.cospi(2), 1.0)
  85. assert ae(fp.cospi(2.25), 0.7071067811865475244)
  86. assert ae(fp.cospi(0+3j), (6195.8239443081075259 + 0.0j))
  87. assert ae(fp.cospi(0.25+3j), (4381.1091260582448033 - 4381.1090689950686908j))
  88. assert ae(fp.cospi(0.5+3j), (0.0 - 6195.8238636085899556j))
  89. assert ae(fp.cospi(0.75+3j), (-4381.1091260582448033 - 4381.1090689950686908j))
  90. assert ae(fp.cospi(1+3j), (-6195.8239443081075259 + 0.0j))
  91. assert ae(fp.cospi(1.25+3j), (-4381.1091260582448033 + 4381.1090689950686908j))
  92. assert ae(fp.cospi(1.5+3j), (0.0 + 6195.8238636085899556j))
  93. assert ae(fp.cospi(1.75+3j), (4381.1091260582448033 + 4381.1090689950686908j))
  94. assert ae(fp.cospi(2+3j), (6195.8239443081075259 + 0.0j))
  95. assert ae(fp.cospi(2.25+3j), (4381.1091260582448033 - 4381.1090689950686908j))
  96. assert ae(fp.cospi(-0.75), -0.7071067811865475244)
  97. assert ae(fp.sinpi(-0.7), -0.80901699437494750611)
  98. assert ae(fp.cospi(-0.7), -0.5877852522924730163)
  99. assert ae(fp.cospi(-3+2j), (-267.74676148374822225 + 0.0j))
  100. assert ae(fp.sinpi(-3+2j), (0.0 - 267.74489404101651426j))
  101. assert ae(fp.sinpi(-0.7+2j), (-216.6116802292079471 - 157.37650009392034693j))
  102. assert ae(fp.cospi(-0.7+2j), (-157.37759774921754565 + 216.61016943630197336j))
  103. def test_fp_expj():
  104. assert ae(fp.expj(0), (1.0 + 0.0j))
  105. assert ae(fp.expj(1), (0.5403023058681397174 + 0.84147098480789650665j))
  106. assert ae(fp.expj(2), (-0.416146836547142387 + 0.9092974268256816954j))
  107. assert ae(fp.expj(0.75), (0.73168886887382088631 + 0.68163876002333416673j))
  108. assert ae(fp.expj(2+3j), (-0.020718731002242879378 + 0.045271253156092975488j))
  109. assert ae(fp.expjpi(0), (1.0 + 0.0j))
  110. assert ae(fp.expjpi(1), (-1.0 + 0.0j))
  111. assert ae(fp.expjpi(2), (1.0 + 0.0j))
  112. assert ae(fp.expjpi(0.75), (-0.7071067811865475244 + 0.7071067811865475244j))
  113. assert ae(fp.expjpi(2+3j), (0.000080699517570304599239 + 0.0j))
  114. def test_fp_bernoulli():
  115. assert ae(fp.bernoulli(0), 1.0)
  116. assert ae(fp.bernoulli(1), -0.5)
  117. assert ae(fp.bernoulli(2), 0.16666666666666666667)
  118. assert ae(fp.bernoulli(10), 0.075757575757575757576)
  119. assert ae(fp.bernoulli(11), 0.0)
  120. def test_fp_gamma():
  121. assert ae(fp.gamma(1), 1.0)
  122. assert ae(fp.gamma(1.5), 0.88622692545275801365)
  123. assert ae(fp.gamma(10), 362880.0)
  124. assert ae(fp.gamma(-0.5), -3.5449077018110320546)
  125. assert ae(fp.gamma(-7.1), 0.0016478244570263333622)
  126. assert ae(fp.gamma(12.3), 83385367.899970000963)
  127. assert ae(fp.gamma(2+0j), (1.0 + 0.0j))
  128. assert ae(fp.gamma(-2.5+0j), (-0.94530872048294188123 + 0.0j))
  129. assert ae(fp.gamma(3+4j), (0.0052255384713692141947 - 0.17254707929430018772j))
  130. assert ae(fp.gamma(-3-4j), (0.00001460997305874775607 - 0.000020760733311509070396j))
  131. assert ae(fp.fac(0), 1.0)
  132. assert ae(fp.fac(1), 1.0)
  133. assert ae(fp.fac(20), 2432902008176640000.0)
  134. assert ae(fp.fac(-3.5), -0.94530872048294188123)
  135. assert ae(fp.fac(2+3j), (-0.44011340763700171113 - 0.06363724312631702183j))
  136. assert ae(fp.loggamma(1.0), 0.0)
  137. assert ae(fp.loggamma(2.0), 0.0)
  138. assert ae(fp.loggamma(3.0), 0.69314718055994530942)
  139. assert ae(fp.loggamma(7.25), 7.0521854507385394449)
  140. assert ae(fp.loggamma(1000.0), 5905.2204232091812118)
  141. assert ae(fp.loggamma(1e50), 1.1412925464970229298e+52)
  142. assert ae(fp.loggamma(1e25+1e25j), (5.6125802751733671621e+26 + 5.7696599078528568383e+26j))
  143. assert ae(fp.loggamma(3+4j), (-1.7566267846037841105 + 4.7426644380346579282j))
  144. assert ae(fp.loggamma(-0.5), (1.2655121234846453965 - 3.1415926535897932385j))
  145. assert ae(fp.loggamma(-1.25), (1.3664317612369762346 - 6.2831853071795864769j))
  146. assert ae(fp.loggamma(-2.75), (0.0044878975359557733115 - 9.4247779607693797154j))
  147. assert ae(fp.loggamma(-3.5), (-1.3090066849930420464 - 12.566370614359172954j))
  148. assert ae(fp.loggamma(-4.5), (-2.8130840817693161197 - 15.707963267948966192j))
  149. assert ae(fp.loggamma(-2+3j), (-6.776523813485657093 - 4.568791367260286402j))
  150. assert ae(fp.loggamma(-1000.3), (-5912.8440347785205041 - 3144.7342462433830317j))
  151. assert ae(fp.loggamma(-100-100j), (-632.35117666833135562 - 158.37641469650352462j))
  152. assert ae(fp.loggamma(1e-10), 23.025850929882735237)
  153. assert ae(fp.loggamma(-1e-10), (23.02585092999817837 - 3.1415926535897932385j))
  154. assert ae(fp.loggamma(1e-10j), (23.025850929940456804 - 1.5707963268526181857j))
  155. assert ae(fp.loggamma(1e-10j-1e-10), (22.679277339718205716 - 2.3561944902500664954j))
  156. def test_fp_psi():
  157. assert ae(fp.psi(0, 3.7), 1.1671535393615114409)
  158. assert ae(fp.psi(0, 0.5), -1.9635100260214234794)
  159. assert ae(fp.psi(0, 1), -0.57721566490153286061)
  160. assert ae(fp.psi(0, -2.5), 1.1031566406452431872)
  161. assert ae(fp.psi(0, 12.9), 2.5179671503279156347)
  162. assert ae(fp.psi(0, 100), 4.6001618527380874002)
  163. assert ae(fp.psi(0, 2500.3), 7.8239660143238547877)
  164. assert ae(fp.psi(0, 1e40), 92.103403719761827391)
  165. assert ae(fp.psi(0, 1e200), 460.51701859880913677)
  166. assert ae(fp.psi(0, 3.7+0j), (1.1671535393615114409 + 0.0j))
  167. assert ae(fp.psi(1, 3), 0.39493406684822643647)
  168. assert ae(fp.psi(3, 2+3j), (-0.05383196209159972116 + 0.0076890935247364805218j))
  169. assert ae(fp.psi(4, -0.5+1j), (1.2719531355492328195 - 18.211833410936276774j))
  170. assert ae(fp.harmonic(0), 0.0)
  171. assert ae(fp.harmonic(1), 1.0)
  172. assert ae(fp.harmonic(2), 1.5)
  173. assert ae(fp.harmonic(100), 5.1873775176396202608)
  174. assert ae(fp.harmonic(-2.5), 1.2803723055467760478)
  175. assert ae(fp.harmonic(2+3j), (1.9390425294578375875 + 0.87336044981834544043j))
  176. assert ae(fp.harmonic(-5-4j), (2.3725754822349437733 - 2.4160904444801621j))
  177. def test_fp_zeta():
  178. assert ae(fp.zeta(1e100), 1.0)
  179. assert ae(fp.zeta(3), 1.2020569031595942854)
  180. assert ae(fp.zeta(2+0j), (1.6449340668482264365 + 0.0j))
  181. assert ae(fp.zeta(0.93), -13.713619351638164784)
  182. assert ae(fp.zeta(1.74), 1.9796863545771774095)
  183. assert ae(fp.zeta(0.0), -0.5)
  184. assert ae(fp.zeta(-1.0), -0.083333333333333333333)
  185. assert ae(fp.zeta(-2.0), 0.0)
  186. assert ae(fp.zeta(-3.0), 0.0083333333333333333333)
  187. assert ae(fp.zeta(-500.0), 0.0)
  188. assert ae(fp.zeta(-7.4), 0.0036537321227995882447)
  189. assert ae(fp.zeta(2.1), 1.5602165335033620158)
  190. assert ae(fp.zeta(26.9), 1.0000000079854809935)
  191. assert ae(fp.zeta(26), 1.0000000149015548284)
  192. assert ae(fp.zeta(27), 1.0000000074507117898)
  193. assert ae(fp.zeta(28), 1.0000000037253340248)
  194. assert ae(fp.zeta(27.1), 1.000000006951755045)
  195. assert ae(fp.zeta(32.7), 1.0000000001433243232)
  196. assert ae(fp.zeta(100), 1.0)
  197. assert ae(fp.altzeta(3.5), 0.92755357777394803511)
  198. assert ae(fp.altzeta(1), 0.69314718055994530942)
  199. assert ae(fp.altzeta(2), 0.82246703342411321824)
  200. assert ae(fp.altzeta(0), 0.5)
  201. assert ae(fp.zeta(-2+3j, 1), (0.13297115587929864827 + 0.12305330040458776494j))
  202. assert ae(fp.zeta(-2+3j, 5), (18.384866151867576927 - 11.377015110597711009j))
  203. assert ae(fp.zeta(1.0000000001), 9999999173.1735741337)
  204. assert ae(fp.zeta(0.9999999999), -9999999172.0191428039)
  205. assert ae(fp.zeta(1+0.000000001j), (0.57721566490153286061 - 999999999.99999993765j))
  206. assert ae(fp.primezeta(2.5+4j), (-0.16922458243438033385 - 0.010847965298387727811j))
  207. assert ae(fp.primezeta(4), 0.076993139764246844943)
  208. assert ae(fp.riemannr(3.7), 2.3034079839110855717)
  209. assert ae(fp.riemannr(8), 3.9011860449341499474)
  210. assert ae(fp.riemannr(3+4j), (2.2369653314259991796 + 1.6339943856990281694j))
  211. def test_fp_hyp2f1():
  212. assert ae(fp.hyp2f1(1, (3,2), 3.25, 5.0), (-0.46600275923108143059 - 0.74393667908854842325j))
  213. assert ae(fp.hyp2f1(1+1j, (3,2), 3.25, 5.0), (-5.9208875603806515987 - 2.3813557707889590686j))
  214. assert ae(fp.hyp2f1(1+1j, (3,2), 3.25, 2+3j), (0.17174552030925080445 + 0.19589781970539389999j))
  215. def test_fp_erf():
  216. assert fp.erf(2) == fp.erf(2.0) == fp.erf(2.0+0.0j)
  217. assert fp.erf(fp.inf) == 1.0
  218. assert fp.erf(fp.ninf) == -1.0
  219. assert ae(fp.erf(0), 0.0)
  220. assert ae(fp.erf(-0), -0.0)
  221. assert ae(fp.erf(0.3), 0.32862675945912741619)
  222. assert ae(fp.erf(-0.3), -0.32862675945912741619)
  223. assert ae(fp.erf(0.9), 0.79690821242283213966)
  224. assert ae(fp.erf(-0.9), -0.79690821242283213966)
  225. assert ae(fp.erf(1.0), 0.84270079294971486934)
  226. assert ae(fp.erf(-1.0), -0.84270079294971486934)
  227. assert ae(fp.erf(1.1), 0.88020506957408172966)
  228. assert ae(fp.erf(-1.1), -0.88020506957408172966)
  229. assert ae(fp.erf(8.5), 1.0)
  230. assert ae(fp.erf(-8.5), -1.0)
  231. assert ae(fp.erf(9.1), 1.0)
  232. assert ae(fp.erf(-9.1), -1.0)
  233. assert ae(fp.erf(20.0), 1.0)
  234. assert ae(fp.erf(-20.0), -1.0)
  235. assert ae(fp.erf(10000.0), 1.0)
  236. assert ae(fp.erf(-10000.0), -1.0)
  237. assert ae(fp.erf(1e+50), 1.0)
  238. assert ae(fp.erf(-1e+50), -1.0)
  239. assert ae(fp.erf(1j), 1.650425758797542876j)
  240. assert ae(fp.erf(-1j), -1.650425758797542876j)
  241. assert ae(fp.erf((2+3j)), (-20.829461427614568389 + 8.6873182714701631444j))
  242. assert ae(fp.erf(-(2+3j)), -(-20.829461427614568389 + 8.6873182714701631444j))
  243. assert ae(fp.erf((8+9j)), (-1072004.2525062051158 + 364149.91954310255423j))
  244. assert ae(fp.erf(-(8+9j)), -(-1072004.2525062051158 + 364149.91954310255423j))
  245. assert fp.erfc(fp.inf) == 0.0
  246. assert fp.erfc(fp.ninf) == 2.0
  247. assert fp.erfc(0) == 1
  248. assert fp.erfc(-0.0) == 1
  249. assert fp.erfc(0+0j) == 1
  250. assert ae(fp.erfc(0.3), 0.67137324054087258381)
  251. assert ae(fp.erfc(-0.3), 1.3286267594591274162)
  252. assert ae(fp.erfc(0.9), 0.20309178757716786034)
  253. assert ae(fp.erfc(-0.9), 1.7969082124228321397)
  254. assert ae(fp.erfc(1.0), 0.15729920705028513066)
  255. assert ae(fp.erfc(-1.0), 1.8427007929497148693)
  256. assert ae(fp.erfc(1.1), 0.11979493042591827034)
  257. assert ae(fp.erfc(-1.1), 1.8802050695740817297)
  258. assert ae(fp.erfc(8.5), 2.7623240713337714461e-33)
  259. assert ae(fp.erfc(-8.5), 2.0)
  260. assert ae(fp.erfc(9.1), 6.6969004279886077452e-38)
  261. assert ae(fp.erfc(-9.1), 2.0)
  262. assert ae(fp.erfc(20.0), 5.3958656116079009289e-176)
  263. assert ae(fp.erfc(-20.0), 2.0)
  264. assert ae(fp.erfc(10000.0), 0.0)
  265. assert ae(fp.erfc(-10000.0), 2.0)
  266. assert ae(fp.erfc(1e+50), 0.0)
  267. assert ae(fp.erfc(-1e+50), 2.0)
  268. assert ae(fp.erfc(1j), (1.0 - 1.650425758797542876j))
  269. assert ae(fp.erfc(-1j), (1.0 + 1.650425758797542876j))
  270. assert ae(fp.erfc((2+3j)), (21.829461427614568389 - 8.6873182714701631444j), 1e-13)
  271. assert ae(fp.erfc(-(2+3j)), (-19.829461427614568389 + 8.6873182714701631444j), 1e-13)
  272. assert ae(fp.erfc((8+9j)), (1072005.2525062051158 - 364149.91954310255423j))
  273. assert ae(fp.erfc(-(8+9j)), (-1072003.2525062051158 + 364149.91954310255423j))
  274. assert ae(fp.erfc(20+0j), (5.3958656116079009289e-176 + 0.0j))
  275. def test_fp_lambertw():
  276. assert ae(fp.lambertw(0.0), 0.0)
  277. assert ae(fp.lambertw(1.0), 0.567143290409783873)
  278. assert ae(fp.lambertw(7.5), 1.5662309537823875394)
  279. assert ae(fp.lambertw(-0.25), -0.35740295618138890307)
  280. assert ae(fp.lambertw(-10.0), (1.3699809685212708156 + 2.140194527074713196j))
  281. assert ae(fp.lambertw(0+0j), (0.0 + 0.0j))
  282. assert ae(fp.lambertw(4+0j), (1.2021678731970429392 + 0.0j))
  283. assert ae(fp.lambertw(1000.5), 5.2500227450408980127)
  284. assert ae(fp.lambertw(1e100), 224.84310644511850156)
  285. assert ae(fp.lambertw(-1000.0), (5.1501630246362515223 + 2.6641981432905204596j))
  286. assert ae(fp.lambertw(1e-10), 9.9999999990000003645e-11)
  287. assert ae(fp.lambertw(1e-10j), (1.0000000000000000728e-20 + 1.0000000000000000364e-10j))
  288. assert ae(fp.lambertw(3+4j), (1.2815618061237758782 + 0.53309522202097107131j))
  289. assert ae(fp.lambertw(-3-4j), (1.0750730665692549276 - 1.3251023817343588823j))
  290. assert ae(fp.lambertw(10000+1000j), (7.2361526563371602186 + 0.087567810943839352034j))
  291. assert ae(fp.lambertw(0.0, -1), -fp.inf)
  292. assert ae(fp.lambertw(1.0, -1), (-1.5339133197935745079 - 4.3751851530618983855j))
  293. assert ae(fp.lambertw(7.5, -1), (0.44125668415098614999 - 4.8039842008452390179j))
  294. assert ae(fp.lambertw(-0.25, -1), -2.1532923641103496492)
  295. assert ae(fp.lambertw(-10.0, -1), (1.3699809685212708156 - 2.140194527074713196j))
  296. assert ae(fp.lambertw(0+0j, -1), -fp.inf)
  297. assert ae(fp.lambertw(4+0j, -1), (-0.15730793189620765317 - 4.6787800704666656212j))
  298. assert ae(fp.lambertw(1000.5, -1), (4.9153765415404024736 - 5.4465682700815159569j))
  299. assert ae(fp.lambertw(1e100, -1), (224.84272130101601052 - 6.2553713838167244141j))
  300. assert ae(fp.lambertw(-1000.0, -1), (5.1501630246362515223 - 2.6641981432905204596j))
  301. assert ae(fp.lambertw(1e-10, -1), (-26.303186778379041521 - 3.2650939117038283975j))
  302. assert ae(fp.lambertw(1e-10j, -1), (-26.297238779529035028 - 1.6328071613455765135j))
  303. assert ae(fp.lambertw(3+4j, -1), (0.25856740686699741676 - 3.8521166861614355895j))
  304. assert ae(fp.lambertw(-3-4j, -1), (-0.32028750204310768396 - 6.8801677192091972343j))
  305. assert ae(fp.lambertw(10000+1000j, -1), (7.0255308742285435567 - 5.5177506835734067601j))
  306. assert ae(fp.lambertw(0.0, 2), -fp.inf)
  307. assert ae(fp.lambertw(1.0, 2), (-2.4015851048680028842 + 10.776299516115070898j))
  308. assert ae(fp.lambertw(7.5, 2), (-0.38003357962843791529 + 10.960916473368746184j))
  309. assert ae(fp.lambertw(-0.25, 2), (-4.0558735269061511898 + 13.852334658567271386j))
  310. assert ae(fp.lambertw(-10.0, 2), (-0.34479123764318858696 + 14.112740596763592363j))
  311. assert ae(fp.lambertw(0+0j, 2), -fp.inf)
  312. assert ae(fp.lambertw(4+0j, 2), (-1.0070343323804262788 + 10.903476551861683082j))
  313. assert ae(fp.lambertw(1000.5, 2), (4.4076185165459395295 + 11.365524591091402177j))
  314. assert ae(fp.lambertw(1e100, 2), (224.84156762724875878 + 12.510785262632255672j))
  315. assert ae(fp.lambertw(-1000.0, 2), (4.1984245610246530756 + 14.420478573754313845j))
  316. assert ae(fp.lambertw(1e-10, 2), (-26.362258095445866488 + 9.7800247407031482519j))
  317. assert ae(fp.lambertw(1e-10j, 2), (-26.384250801683084252 + 11.403535950607739763j))
  318. assert ae(fp.lambertw(3+4j, 2), (-0.86554679943333993562 + 11.849956798331992027j))
  319. assert ae(fp.lambertw(-3-4j, 2), (-0.55792273874679112639 + 8.7173627024159324811j))
  320. assert ae(fp.lambertw(10000+1000j, 2), (6.6223802254585662734 + 11.61348646825020766j))
  321. def test_fp_stress_ei_e1():
  322. # Can be tightened on recent Pythons with more accurate math/cmath
  323. ATOL = 1e-13
  324. PTOL = 1e-12
  325. v = fp.e1(1.1641532182693481445e-10)
  326. assert ae(v, 22.296641293693077672, tol=ATOL)
  327. assert type(v) is float
  328. v = fp.e1(0.25)
  329. assert ae(v, 1.0442826344437381945, tol=ATOL)
  330. assert type(v) is float
  331. v = fp.e1(1.0)
  332. assert ae(v, 0.21938393439552027368, tol=ATOL)
  333. assert type(v) is float
  334. v = fp.e1(2.0)
  335. assert ae(v, 0.048900510708061119567, tol=ATOL)
  336. assert type(v) is float
  337. v = fp.e1(5.0)
  338. assert ae(v, 0.0011482955912753257973, tol=ATOL)
  339. assert type(v) is float
  340. v = fp.e1(20.0)
  341. assert ae(v, 9.8355252906498816904e-11, tol=ATOL)
  342. assert type(v) is float
  343. v = fp.e1(30.0)
  344. assert ae(v, 3.0215520106888125448e-15, tol=ATOL)
  345. assert type(v) is float
  346. v = fp.e1(40.0)
  347. assert ae(v, 1.0367732614516569722e-19, tol=ATOL)
  348. assert type(v) is float
  349. v = fp.e1(50.0)
  350. assert ae(v, 3.7832640295504590187e-24, tol=ATOL)
  351. assert type(v) is float
  352. v = fp.e1(80.0)
  353. assert ae(v, 2.2285432586884729112e-37, tol=ATOL)
  354. assert type(v) is float
  355. v = fp.e1((1.1641532182693481445e-10 + 0.0j))
  356. assert ae(v, (22.296641293693077672 + 0.0j), tol=ATOL)
  357. assert ae(v.real, 22.296641293693077672, tol=PTOL)
  358. assert v.imag == 0
  359. v = fp.e1((0.25 + 0.0j))
  360. assert ae(v, (1.0442826344437381945 + 0.0j), tol=ATOL)
  361. assert ae(v.real, 1.0442826344437381945, tol=PTOL)
  362. assert v.imag == 0
  363. v = fp.e1((1.0 + 0.0j))
  364. assert ae(v, (0.21938393439552027368 + 0.0j), tol=ATOL)
  365. assert ae(v.real, 0.21938393439552027368, tol=PTOL)
  366. assert v.imag == 0
  367. v = fp.e1((2.0 + 0.0j))
  368. assert ae(v, (0.048900510708061119567 + 0.0j), tol=ATOL)
  369. assert ae(v.real, 0.048900510708061119567, tol=PTOL)
  370. assert v.imag == 0
  371. v = fp.e1((5.0 + 0.0j))
  372. assert ae(v, (0.0011482955912753257973 + 0.0j), tol=ATOL)
  373. assert ae(v.real, 0.0011482955912753257973, tol=PTOL)
  374. assert v.imag == 0
  375. v = fp.e1((20.0 + 0.0j))
  376. assert ae(v, (9.8355252906498816904e-11 + 0.0j), tol=ATOL)
  377. assert ae(v.real, 9.8355252906498816904e-11, tol=PTOL)
  378. assert v.imag == 0
  379. v = fp.e1((30.0 + 0.0j))
  380. assert ae(v, (3.0215520106888125448e-15 + 0.0j), tol=ATOL)
  381. assert ae(v.real, 3.0215520106888125448e-15, tol=PTOL)
  382. assert v.imag == 0
  383. v = fp.e1((40.0 + 0.0j))
  384. assert ae(v, (1.0367732614516569722e-19 + 0.0j), tol=ATOL)
  385. assert ae(v.real, 1.0367732614516569722e-19, tol=PTOL)
  386. assert v.imag == 0
  387. v = fp.e1((50.0 + 0.0j))
  388. assert ae(v, (3.7832640295504590187e-24 + 0.0j), tol=ATOL)
  389. assert ae(v.real, 3.7832640295504590187e-24, tol=PTOL)
  390. assert v.imag == 0
  391. v = fp.e1((80.0 + 0.0j))
  392. assert ae(v, (2.2285432586884729112e-37 + 0.0j), tol=ATOL)
  393. assert ae(v.real, 2.2285432586884729112e-37, tol=PTOL)
  394. assert v.imag == 0
  395. v = fp.e1((4.6566128730773925781e-10 + 1.1641532182693481445e-10j))
  396. assert ae(v, (20.880034622014215597 - 0.24497866301044883237j), tol=ATOL)
  397. assert ae(v.real, 20.880034622014215597, tol=PTOL)
  398. assert ae(v.imag, -0.24497866301044883237, tol=PTOL)
  399. v = fp.e1((1.0 + 0.25j))
  400. assert ae(v, (0.19731063945004229095 - 0.087366045774299963672j), tol=ATOL)
  401. assert ae(v.real, 0.19731063945004229095, tol=PTOL)
  402. assert ae(v.imag, -0.087366045774299963672, tol=PTOL)
  403. v = fp.e1((4.0 + 1.0j))
  404. assert ae(v, (0.0013106173980145506944 - 0.0034542480199350626699j), tol=ATOL)
  405. assert ae(v.real, 0.0013106173980145506944, tol=PTOL)
  406. assert ae(v.imag, -0.0034542480199350626699, tol=PTOL)
  407. v = fp.e1((8.0 + 2.0j))
  408. assert ae(v, (-0.000022278049065270225945 - 0.000029191940456521555288j), tol=ATOL)
  409. assert ae(v.real, -0.000022278049065270225945, tol=PTOL)
  410. assert ae(v.imag, -0.000029191940456521555288, tol=PTOL)
  411. v = fp.e1((20.0 + 5.0j))
  412. assert ae(v, (4.7711374515765346894e-11 + 8.2902652405126947359e-11j), tol=ATOL)
  413. assert ae(v.real, 4.7711374515765346894e-11, tol=PTOL)
  414. assert ae(v.imag, 8.2902652405126947359e-11, tol=PTOL)
  415. v = fp.e1((80.0 + 20.0j))
  416. assert ae(v, (3.8353473865788235787e-38 - 2.129247592349605139e-37j), tol=ATOL)
  417. assert ae(v.real, 3.8353473865788235787e-38, tol=PTOL)
  418. assert ae(v.imag, -2.129247592349605139e-37, tol=PTOL)
  419. v = fp.e1((120.0 + 30.0j))
  420. assert ae(v, (2.3836002337480334716e-55 + 5.6704043587126198306e-55j), tol=ATOL)
  421. assert ae(v.real, 2.3836002337480334716e-55, tol=PTOL)
  422. assert ae(v.imag, 5.6704043587126198306e-55, tol=PTOL)
  423. v = fp.e1((160.0 + 40.0j))
  424. assert ae(v, (-1.6238022898654510661e-72 - 1.104172355572287367e-72j), tol=ATOL)
  425. assert ae(v.real, -1.6238022898654510661e-72, tol=PTOL)
  426. assert ae(v.imag, -1.104172355572287367e-72, tol=PTOL)
  427. v = fp.e1((200.0 + 50.0j))
  428. assert ae(v, (6.6800061461666228487e-90 + 1.4473816083541016115e-91j), tol=ATOL)
  429. assert ae(v.real, 6.6800061461666228487e-90, tol=PTOL)
  430. assert ae(v.imag, 1.4473816083541016115e-91, tol=PTOL)
  431. v = fp.e1((320.0 + 80.0j))
  432. assert ae(v, (4.2737871527778786157e-143 + 3.1789935525785660314e-142j), tol=ATOL)
  433. assert ae(v.real, 4.2737871527778786157e-143, tol=PTOL)
  434. assert ae(v.imag, 3.1789935525785660314e-142, tol=PTOL)
  435. v = fp.e1((1.1641532182693481445e-10 + 1.1641532182693481445e-10j))
  436. assert ae(v, (21.950067703413105017 - 0.7853981632810329878j), tol=ATOL)
  437. assert ae(v.real, 21.950067703413105017, tol=PTOL)
  438. assert ae(v.imag, -0.7853981632810329878, tol=PTOL)
  439. v = fp.e1((0.25 + 0.25j))
  440. assert ae(v, (0.71092525792923287894 - 0.56491812441304194711j), tol=ATOL)
  441. assert ae(v.real, 0.71092525792923287894, tol=PTOL)
  442. assert ae(v.imag, -0.56491812441304194711, tol=PTOL)
  443. v = fp.e1((1.0 + 1.0j))
  444. assert ae(v, (0.00028162445198141832551 - 0.17932453503935894015j), tol=ATOL)
  445. assert ae(v.real, 0.00028162445198141832551, tol=PTOL)
  446. assert ae(v.imag, -0.17932453503935894015, tol=PTOL)
  447. v = fp.e1((2.0 + 2.0j))
  448. assert ae(v, (-0.033767089606562004246 - 0.018599414169750541925j), tol=ATOL)
  449. assert ae(v.real, -0.033767089606562004246, tol=PTOL)
  450. assert ae(v.imag, -0.018599414169750541925, tol=PTOL)
  451. v = fp.e1((5.0 + 5.0j))
  452. assert ae(v, (0.0007266506660356393891 + 0.00047102780163522245054j), tol=ATOL)
  453. assert ae(v.real, 0.0007266506660356393891, tol=PTOL)
  454. assert ae(v.imag, 0.00047102780163522245054, tol=PTOL)
  455. v = fp.e1((20.0 + 20.0j))
  456. assert ae(v, (-2.3824537449367396579e-11 - 6.6969873156525615158e-11j), tol=ATOL)
  457. assert ae(v.real, -2.3824537449367396579e-11, tol=PTOL)
  458. assert ae(v.imag, -6.6969873156525615158e-11, tol=PTOL)
  459. v = fp.e1((30.0 + 30.0j))
  460. assert ae(v, (1.7316045841744061617e-15 + 1.3065678019487308689e-15j), tol=ATOL)
  461. assert ae(v.real, 1.7316045841744061617e-15, tol=PTOL)
  462. assert ae(v.imag, 1.3065678019487308689e-15, tol=PTOL)
  463. v = fp.e1((40.0 + 40.0j))
  464. assert ae(v, (-7.4001043002899232182e-20 - 4.991847855336816304e-21j), tol=ATOL)
  465. assert ae(v.real, -7.4001043002899232182e-20, tol=PTOL)
  466. assert ae(v.imag, -4.991847855336816304e-21, tol=PTOL)
  467. v = fp.e1((50.0 + 50.0j))
  468. assert ae(v, (2.3566128324644641219e-24 - 1.3188326726201614778e-24j), tol=ATOL)
  469. assert ae(v.real, 2.3566128324644641219e-24, tol=PTOL)
  470. assert ae(v.imag, -1.3188326726201614778e-24, tol=PTOL)
  471. v = fp.e1((80.0 + 80.0j))
  472. assert ae(v, (9.8279750572186526673e-38 + 1.243952841288868831e-37j), tol=ATOL)
  473. assert ae(v.real, 9.8279750572186526673e-38, tol=PTOL)
  474. assert ae(v.imag, 1.243952841288868831e-37, tol=PTOL)
  475. v = fp.e1((1.1641532182693481445e-10 + 4.6566128730773925781e-10j))
  476. assert ae(v, (20.880034621664969632 - 1.3258176632023711778j), tol=ATOL)
  477. assert ae(v.real, 20.880034621664969632, tol=PTOL)
  478. assert ae(v.imag, -1.3258176632023711778, tol=PTOL)
  479. v = fp.e1((0.25 + 1.0j))
  480. assert ae(v, (-0.16868306393667788761 - 0.4858011885947426971j), tol=ATOL)
  481. assert ae(v.real, -0.16868306393667788761, tol=PTOL)
  482. assert ae(v.imag, -0.4858011885947426971, tol=PTOL)
  483. v = fp.e1((1.0 + 4.0j))
  484. assert ae(v, (0.03373591813926547318 + 0.073523452241083821877j), tol=ATOL)
  485. assert ae(v.real, 0.03373591813926547318, tol=PTOL)
  486. assert ae(v.imag, 0.073523452241083821877, tol=PTOL)
  487. v = fp.e1((2.0 + 8.0j))
  488. assert ae(v, (-0.015392833434733785143 - 0.0031747121557605415914j), tol=ATOL)
  489. assert ae(v.real, -0.015392833434733785143, tol=PTOL)
  490. assert ae(v.imag, -0.0031747121557605415914, tol=PTOL)
  491. v = fp.e1((5.0 + 20.0j))
  492. assert ae(v, (-0.00024419662286542966525 - 0.00021008322966152755674j), tol=ATOL)
  493. assert ae(v.real, -0.00024419662286542966525, tol=PTOL)
  494. assert ae(v.imag, -0.00021008322966152755674, tol=PTOL)
  495. v = fp.e1((20.0 + 80.0j))
  496. assert ae(v, (2.3255552781051330088e-11 + 8.9463918891349438007e-12j), tol=ATOL)
  497. assert ae(v.real, 2.3255552781051330088e-11, tol=PTOL)
  498. assert ae(v.imag, 8.9463918891349438007e-12, tol=PTOL)
  499. v = fp.e1((30.0 + 120.0j))
  500. assert ae(v, (-2.7068919097124652332e-16 - 7.0477762411705130239e-16j), tol=ATOL)
  501. assert ae(v.real, -2.7068919097124652332e-16, tol=PTOL)
  502. assert ae(v.imag, -7.0477762411705130239e-16, tol=PTOL)
  503. v = fp.e1((40.0 + 160.0j))
  504. assert ae(v, (-1.1695597827678024687e-20 + 2.2907401455645736661e-20j), tol=ATOL)
  505. assert ae(v.real, -1.1695597827678024687e-20, tol=PTOL)
  506. assert ae(v.imag, 2.2907401455645736661e-20, tol=PTOL)
  507. v = fp.e1((50.0 + 200.0j))
  508. assert ae(v, (9.0323746914410162531e-25 - 2.3950601790033530935e-25j), tol=ATOL)
  509. assert ae(v.real, 9.0323746914410162531e-25, tol=PTOL)
  510. assert ae(v.imag, -2.3950601790033530935e-25, tol=PTOL)
  511. v = fp.e1((80.0 + 320.0j))
  512. assert ae(v, (3.4819106748728063576e-38 - 4.215653005615772724e-38j), tol=ATOL)
  513. assert ae(v.real, 3.4819106748728063576e-38, tol=PTOL)
  514. assert ae(v.imag, -4.215653005615772724e-38, tol=PTOL)
  515. v = fp.e1((0.0 + 1.1641532182693481445e-10j))
  516. assert ae(v, (22.29664129357666235 - 1.5707963266784812974j), tol=ATOL)
  517. assert ae(v.real, 22.29664129357666235, tol=PTOL)
  518. assert ae(v.imag, -1.5707963266784812974, tol=PTOL)
  519. v = fp.e1((0.0 + 0.25j))
  520. assert ae(v, (0.82466306258094565309 - 1.3216627564751394551j), tol=ATOL)
  521. assert ae(v.real, 0.82466306258094565309, tol=PTOL)
  522. assert ae(v.imag, -1.3216627564751394551, tol=PTOL)
  523. v = fp.e1((0.0 + 1.0j))
  524. assert ae(v, (-0.33740392290096813466 - 0.62471325642771360429j), tol=ATOL)
  525. assert ae(v.real, -0.33740392290096813466, tol=PTOL)
  526. assert ae(v.imag, -0.62471325642771360429, tol=PTOL)
  527. v = fp.e1((0.0 + 2.0j))
  528. assert ae(v, (-0.4229808287748649957 + 0.034616650007798229345j), tol=ATOL)
  529. assert ae(v.real, -0.4229808287748649957, tol=PTOL)
  530. assert ae(v.imag, 0.034616650007798229345, tol=PTOL)
  531. v = fp.e1((0.0 + 5.0j))
  532. assert ae(v, (0.19002974965664387862 - 0.020865081850222481957j), tol=ATOL)
  533. assert ae(v.real, 0.19002974965664387862, tol=PTOL)
  534. assert ae(v.imag, -0.020865081850222481957, tol=PTOL)
  535. v = fp.e1((0.0 + 20.0j))
  536. assert ae(v, (-0.04441982084535331654 - 0.022554625751456779068j), tol=ATOL)
  537. assert ae(v.real, -0.04441982084535331654, tol=PTOL)
  538. assert ae(v.imag, -0.022554625751456779068, tol=PTOL)
  539. v = fp.e1((0.0 + 30.0j))
  540. assert ae(v, (0.033032417282071143779 - 0.0040397867645455082476j), tol=ATOL)
  541. assert ae(v.real, 0.033032417282071143779, tol=PTOL)
  542. assert ae(v.imag, -0.0040397867645455082476, tol=PTOL)
  543. v = fp.e1((0.0 + 40.0j))
  544. assert ae(v, (-0.019020007896208766962 + 0.016188792559887887544j), tol=ATOL)
  545. assert ae(v.real, -0.019020007896208766962, tol=PTOL)
  546. assert ae(v.imag, 0.016188792559887887544, tol=PTOL)
  547. v = fp.e1((0.0 + 50.0j))
  548. assert ae(v, (0.0056283863241163054402 - 0.019179254308960724503j), tol=ATOL)
  549. assert ae(v.real, 0.0056283863241163054402, tol=PTOL)
  550. assert ae(v.imag, -0.019179254308960724503, tol=PTOL)
  551. v = fp.e1((0.0 + 80.0j))
  552. assert ae(v, (0.012402501155070958192 + 0.0015345601175906961199j), tol=ATOL)
  553. assert ae(v.real, 0.012402501155070958192, tol=PTOL)
  554. assert ae(v.imag, 0.0015345601175906961199, tol=PTOL)
  555. v = fp.e1((-1.1641532182693481445e-10 + 4.6566128730773925781e-10j))
  556. assert ae(v, (20.880034621432138988 - 1.8157749894560994861j), tol=ATOL)
  557. assert ae(v.real, 20.880034621432138988, tol=PTOL)
  558. assert ae(v.imag, -1.8157749894560994861, tol=PTOL)
  559. v = fp.e1((-0.25 + 1.0j))
  560. assert ae(v, (-0.59066621214766308594 - 0.74474454765205036972j), tol=ATOL)
  561. assert ae(v.real, -0.59066621214766308594, tol=PTOL)
  562. assert ae(v.imag, -0.74474454765205036972, tol=PTOL)
  563. v = fp.e1((-1.0 + 4.0j))
  564. assert ae(v, (0.49739047283060471093 + 0.41543605404038863174j), tol=ATOL)
  565. assert ae(v.real, 0.49739047283060471093, tol=PTOL)
  566. assert ae(v.imag, 0.41543605404038863174, tol=PTOL)
  567. v = fp.e1((-2.0 + 8.0j))
  568. assert ae(v, (-0.8705211147733730969 + 0.24099328498605539667j), tol=ATOL)
  569. assert ae(v.real, -0.8705211147733730969, tol=PTOL)
  570. assert ae(v.imag, 0.24099328498605539667, tol=PTOL)
  571. v = fp.e1((-5.0 + 20.0j))
  572. assert ae(v, (-7.0789514293925893007 - 1.6102177171960790536j), tol=ATOL)
  573. assert ae(v.real, -7.0789514293925893007, tol=PTOL)
  574. assert ae(v.imag, -1.6102177171960790536, tol=PTOL)
  575. v = fp.e1((-20.0 + 80.0j))
  576. assert ae(v, (5855431.4907298084434 - 720920.93315409165707j), tol=ATOL)
  577. assert ae(v.real, 5855431.4907298084434, tol=PTOL)
  578. assert ae(v.imag, -720920.93315409165707, tol=PTOL)
  579. v = fp.e1((-30.0 + 120.0j))
  580. assert ae(v, (-65402491644.703470747 - 56697658399.657460294j), tol=ATOL)
  581. assert ae(v.real, -65402491644.703470747, tol=PTOL)
  582. assert ae(v.imag, -56697658399.657460294, tol=PTOL)
  583. v = fp.e1((-40.0 + 160.0j))
  584. assert ae(v, (25504929379604.776769 + 1429035198630573.2463j), tol=ATOL)
  585. assert ae(v.real, 25504929379604.776769, tol=PTOL)
  586. assert ae(v.imag, 1429035198630573.2463, tol=PTOL)
  587. v = fp.e1((-50.0 + 200.0j))
  588. assert ae(v, (18437746526988116954.0 - 17146362239046152345.0j), tol=ATOL)
  589. assert ae(v.real, 18437746526988116954.0, tol=PTOL)
  590. assert ae(v.imag, -17146362239046152345.0, tol=PTOL)
  591. v = fp.e1((-80.0 + 320.0j))
  592. assert ae(v, (3.3464697299634526706e+31 - 1.6473152633843023919e+32j), tol=ATOL)
  593. assert ae(v.real, 3.3464697299634526706e+31, tol=PTOL)
  594. assert ae(v.imag, -1.6473152633843023919e+32, tol=PTOL)
  595. v = fp.e1((-4.6566128730773925781e-10 + 1.1641532182693481445e-10j))
  596. assert ae(v, (20.880034621082893023 - 2.8966139903465137624j), tol=ATOL)
  597. assert ae(v.real, 20.880034621082893023, tol=PTOL)
  598. assert ae(v.imag, -2.8966139903465137624, tol=PTOL)
  599. v = fp.e1((-1.0 + 0.25j))
  600. assert ae(v, (-1.8942716983721074932 - 2.4689102827070540799j), tol=ATOL)
  601. assert ae(v.real, -1.8942716983721074932, tol=PTOL)
  602. assert ae(v.imag, -2.4689102827070540799, tol=PTOL)
  603. v = fp.e1((-4.0 + 1.0j))
  604. assert ae(v, (-14.806699492675420438 + 9.1384225230837893776j), tol=ATOL)
  605. assert ae(v.real, -14.806699492675420438, tol=PTOL)
  606. assert ae(v.imag, 9.1384225230837893776, tol=PTOL)
  607. v = fp.e1((-8.0 + 2.0j))
  608. assert ae(v, (54.633252667426386294 + 413.20318163814670688j), tol=ATOL)
  609. assert ae(v.real, 54.633252667426386294, tol=PTOL)
  610. assert ae(v.imag, 413.20318163814670688, tol=PTOL)
  611. v = fp.e1((-20.0 + 5.0j))
  612. assert ae(v, (-711836.97165402624643 - 24745250.939695900956j), tol=ATOL)
  613. assert ae(v.real, -711836.97165402624643, tol=PTOL)
  614. assert ae(v.imag, -24745250.939695900956, tol=PTOL)
  615. v = fp.e1((-80.0 + 20.0j))
  616. assert ae(v, (-4.2139911108612653091e+32 + 5.3367124741918251637e+32j), tol=ATOL)
  617. assert ae(v.real, -4.2139911108612653091e+32, tol=PTOL)
  618. assert ae(v.imag, 5.3367124741918251637e+32, tol=PTOL)
  619. v = fp.e1((-120.0 + 30.0j))
  620. assert ae(v, (9.7760616203707508892e+48 - 1.058257682317195792e+50j), tol=ATOL)
  621. assert ae(v.real, 9.7760616203707508892e+48, tol=PTOL)
  622. assert ae(v.imag, -1.058257682317195792e+50, tol=PTOL)
  623. v = fp.e1((-160.0 + 40.0j))
  624. assert ae(v, (8.7065541466623638861e+66 + 1.6577106725141739889e+67j), tol=ATOL)
  625. assert ae(v.real, 8.7065541466623638861e+66, tol=PTOL)
  626. assert ae(v.imag, 1.6577106725141739889e+67, tol=PTOL)
  627. v = fp.e1((-200.0 + 50.0j))
  628. assert ae(v, (-3.070744996327018106e+84 - 1.7243244846769415903e+84j), tol=ATOL)
  629. assert ae(v.real, -3.070744996327018106e+84, tol=PTOL)
  630. assert ae(v.imag, -1.7243244846769415903e+84, tol=PTOL)
  631. v = fp.e1((-320.0 + 80.0j))
  632. assert ae(v, (9.9960598637998647276e+135 - 2.6855081527595608863e+136j), tol=ATOL)
  633. assert ae(v.real, 9.9960598637998647276e+135, tol=PTOL)
  634. assert ae(v.imag, -2.6855081527595608863e+136, tol=PTOL)
  635. v = fp.e1(-1.1641532182693481445e-10)
  636. assert ae(v, (22.296641293460247028 - 3.1415926535897932385j), tol=ATOL)
  637. assert ae(v.real, 22.296641293460247028, tol=PTOL)
  638. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  639. v = fp.e1(-0.25)
  640. assert ae(v, (0.54254326466191372953 - 3.1415926535897932385j), tol=ATOL)
  641. assert ae(v.real, 0.54254326466191372953, tol=PTOL)
  642. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  643. v = fp.e1(-1.0)
  644. assert ae(v, (-1.8951178163559367555 - 3.1415926535897932385j), tol=ATOL)
  645. assert ae(v.real, -1.8951178163559367555, tol=PTOL)
  646. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  647. v = fp.e1(-2.0)
  648. assert ae(v, (-4.9542343560018901634 - 3.1415926535897932385j), tol=ATOL)
  649. assert ae(v.real, -4.9542343560018901634, tol=PTOL)
  650. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  651. v = fp.e1(-5.0)
  652. assert ae(v, (-40.185275355803177455 - 3.1415926535897932385j), tol=ATOL)
  653. assert ae(v.real, -40.185275355803177455, tol=PTOL)
  654. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  655. v = fp.e1(-20.0)
  656. assert ae(v, (-25615652.66405658882 - 3.1415926535897932385j), tol=ATOL)
  657. assert ae(v.real, -25615652.66405658882, tol=PTOL)
  658. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  659. v = fp.e1(-30.0)
  660. assert ae(v, (-368973209407.27419706 - 3.1415926535897932385j), tol=ATOL)
  661. assert ae(v.real, -368973209407.27419706, tol=PTOL)
  662. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  663. v = fp.e1(-40.0)
  664. assert ae(v, (-6039718263611241.5784 - 3.1415926535897932385j), tol=ATOL)
  665. assert ae(v.real, -6039718263611241.5784, tol=PTOL)
  666. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  667. v = fp.e1(-50.0)
  668. assert ae(v, (-1.0585636897131690963e+20 - 3.1415926535897932385j), tol=ATOL)
  669. assert ae(v.real, -1.0585636897131690963e+20, tol=PTOL)
  670. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  671. v = fp.e1(-80.0)
  672. assert ae(v, (-7.0146000049047999696e+32 - 3.1415926535897932385j), tol=ATOL)
  673. assert ae(v.real, -7.0146000049047999696e+32, tol=PTOL)
  674. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  675. v = fp.e1((-1.1641532182693481445e-10 + 0.0j))
  676. assert ae(v, (22.296641293460247028 - 3.1415926535897932385j), tol=ATOL)
  677. assert ae(v.real, 22.296641293460247028, tol=PTOL)
  678. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  679. v = fp.e1((-0.25 + 0.0j))
  680. assert ae(v, (0.54254326466191372953 - 3.1415926535897932385j), tol=ATOL)
  681. assert ae(v.real, 0.54254326466191372953, tol=PTOL)
  682. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  683. v = fp.e1((-1.0 + 0.0j))
  684. assert ae(v, (-1.8951178163559367555 - 3.1415926535897932385j), tol=ATOL)
  685. assert ae(v.real, -1.8951178163559367555, tol=PTOL)
  686. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  687. v = fp.e1((-2.0 + 0.0j))
  688. assert ae(v, (-4.9542343560018901634 - 3.1415926535897932385j), tol=ATOL)
  689. assert ae(v.real, -4.9542343560018901634, tol=PTOL)
  690. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  691. v = fp.e1((-5.0 + 0.0j))
  692. assert ae(v, (-40.185275355803177455 - 3.1415926535897932385j), tol=ATOL)
  693. assert ae(v.real, -40.185275355803177455, tol=PTOL)
  694. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  695. v = fp.e1((-20.0 + 0.0j))
  696. assert ae(v, (-25615652.66405658882 - 3.1415926535897932385j), tol=ATOL)
  697. assert ae(v.real, -25615652.66405658882, tol=PTOL)
  698. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  699. v = fp.e1((-30.0 + 0.0j))
  700. assert ae(v, (-368973209407.27419706 - 3.1415926535897932385j), tol=ATOL)
  701. assert ae(v.real, -368973209407.27419706, tol=PTOL)
  702. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  703. v = fp.e1((-40.0 + 0.0j))
  704. assert ae(v, (-6039718263611241.5784 - 3.1415926535897932385j), tol=ATOL)
  705. assert ae(v.real, -6039718263611241.5784, tol=PTOL)
  706. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  707. v = fp.e1((-50.0 + 0.0j))
  708. assert ae(v, (-1.0585636897131690963e+20 - 3.1415926535897932385j), tol=ATOL)
  709. assert ae(v.real, -1.0585636897131690963e+20, tol=PTOL)
  710. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  711. v = fp.e1((-80.0 + 0.0j))
  712. assert ae(v, (-7.0146000049047999696e+32 - 3.1415926535897932385j), tol=ATOL)
  713. assert ae(v.real, -7.0146000049047999696e+32, tol=PTOL)
  714. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  715. v = fp.e1((-4.6566128730773925781e-10 - 1.1641532182693481445e-10j))
  716. assert ae(v, (20.880034621082893023 + 2.8966139903465137624j), tol=ATOL)
  717. assert ae(v.real, 20.880034621082893023, tol=PTOL)
  718. assert ae(v.imag, 2.8966139903465137624, tol=PTOL)
  719. v = fp.e1((-1.0 - 0.25j))
  720. assert ae(v, (-1.8942716983721074932 + 2.4689102827070540799j), tol=ATOL)
  721. assert ae(v.real, -1.8942716983721074932, tol=PTOL)
  722. assert ae(v.imag, 2.4689102827070540799, tol=PTOL)
  723. v = fp.e1((-4.0 - 1.0j))
  724. assert ae(v, (-14.806699492675420438 - 9.1384225230837893776j), tol=ATOL)
  725. assert ae(v.real, -14.806699492675420438, tol=PTOL)
  726. assert ae(v.imag, -9.1384225230837893776, tol=PTOL)
  727. v = fp.e1((-8.0 - 2.0j))
  728. assert ae(v, (54.633252667426386294 - 413.20318163814670688j), tol=ATOL)
  729. assert ae(v.real, 54.633252667426386294, tol=PTOL)
  730. assert ae(v.imag, -413.20318163814670688, tol=PTOL)
  731. v = fp.e1((-20.0 - 5.0j))
  732. assert ae(v, (-711836.97165402624643 + 24745250.939695900956j), tol=ATOL)
  733. assert ae(v.real, -711836.97165402624643, tol=PTOL)
  734. assert ae(v.imag, 24745250.939695900956, tol=PTOL)
  735. v = fp.e1((-80.0 - 20.0j))
  736. assert ae(v, (-4.2139911108612653091e+32 - 5.3367124741918251637e+32j), tol=ATOL)
  737. assert ae(v.real, -4.2139911108612653091e+32, tol=PTOL)
  738. assert ae(v.imag, -5.3367124741918251637e+32, tol=PTOL)
  739. v = fp.e1((-120.0 - 30.0j))
  740. assert ae(v, (9.7760616203707508892e+48 + 1.058257682317195792e+50j), tol=ATOL)
  741. assert ae(v.real, 9.7760616203707508892e+48, tol=PTOL)
  742. assert ae(v.imag, 1.058257682317195792e+50, tol=PTOL)
  743. v = fp.e1((-160.0 - 40.0j))
  744. assert ae(v, (8.7065541466623638861e+66 - 1.6577106725141739889e+67j), tol=ATOL)
  745. assert ae(v.real, 8.7065541466623638861e+66, tol=PTOL)
  746. assert ae(v.imag, -1.6577106725141739889e+67, tol=PTOL)
  747. v = fp.e1((-200.0 - 50.0j))
  748. assert ae(v, (-3.070744996327018106e+84 + 1.7243244846769415903e+84j), tol=ATOL)
  749. assert ae(v.real, -3.070744996327018106e+84, tol=PTOL)
  750. assert ae(v.imag, 1.7243244846769415903e+84, tol=PTOL)
  751. v = fp.e1((-320.0 - 80.0j))
  752. assert ae(v, (9.9960598637998647276e+135 + 2.6855081527595608863e+136j), tol=ATOL)
  753. assert ae(v.real, 9.9960598637998647276e+135, tol=PTOL)
  754. assert ae(v.imag, 2.6855081527595608863e+136, tol=PTOL)
  755. v = fp.e1((-1.1641532182693481445e-10 - 1.1641532182693481445e-10j))
  756. assert ae(v, (21.950067703180274374 + 2.356194490075929607j), tol=ATOL)
  757. assert ae(v.real, 21.950067703180274374, tol=PTOL)
  758. assert ae(v.imag, 2.356194490075929607, tol=PTOL)
  759. v = fp.e1((-0.25 - 0.25j))
  760. assert ae(v, (0.21441047326710323254 + 2.0732153554307936389j), tol=ATOL)
  761. assert ae(v.real, 0.21441047326710323254, tol=PTOL)
  762. assert ae(v.imag, 2.0732153554307936389, tol=PTOL)
  763. v = fp.e1((-1.0 - 1.0j))
  764. assert ae(v, (-1.7646259855638540684 + 0.7538228020792708192j), tol=ATOL)
  765. assert ae(v.real, -1.7646259855638540684, tol=PTOL)
  766. assert ae(v.imag, 0.7538228020792708192, tol=PTOL)
  767. v = fp.e1((-2.0 - 2.0j))
  768. assert ae(v, (-1.8920781621855474089 - 2.1753697842428647236j), tol=ATOL)
  769. assert ae(v.real, -1.8920781621855474089, tol=PTOL)
  770. assert ae(v.imag, -2.1753697842428647236, tol=PTOL)
  771. v = fp.e1((-5.0 - 5.0j))
  772. assert ae(v, (13.470936071475245856 + 18.464085049321024206j), tol=ATOL)
  773. assert ae(v.real, 13.470936071475245856, tol=PTOL)
  774. assert ae(v.imag, 18.464085049321024206, tol=PTOL)
  775. v = fp.e1((-20.0 - 20.0j))
  776. assert ae(v, (-16589317.398788971896 - 5831702.3296441771206j), tol=ATOL)
  777. assert ae(v.real, -16589317.398788971896, tol=PTOL)
  778. assert ae(v.imag, -5831702.3296441771206, tol=PTOL)
  779. v = fp.e1((-30.0 - 30.0j))
  780. assert ae(v, (154596484273.69322527 + 204179357837.41389696j), tol=ATOL)
  781. assert ae(v.real, 154596484273.69322527, tol=PTOL)
  782. assert ae(v.imag, 204179357837.41389696, tol=PTOL)
  783. v = fp.e1((-40.0 - 40.0j))
  784. assert ae(v, (-287512180321448.45408 - 4203502407932314.974j), tol=ATOL)
  785. assert ae(v.real, -287512180321448.45408, tol=PTOL)
  786. assert ae(v.imag, -4203502407932314.974, tol=PTOL)
  787. v = fp.e1((-50.0 - 50.0j))
  788. assert ae(v, (-36128528616649268826.0 + 64648801861338741963.0j), tol=ATOL)
  789. assert ae(v.real, -36128528616649268826.0, tol=PTOL)
  790. assert ae(v.imag, 64648801861338741963.0, tol=PTOL)
  791. v = fp.e1((-80.0 - 80.0j))
  792. assert ae(v, (3.8674816337930010217e+32 + 3.0540709639658071041e+32j), tol=ATOL)
  793. assert ae(v.real, 3.8674816337930010217e+32, tol=PTOL)
  794. assert ae(v.imag, 3.0540709639658071041e+32, tol=PTOL)
  795. v = fp.e1((-1.1641532182693481445e-10 - 4.6566128730773925781e-10j))
  796. assert ae(v, (20.880034621432138988 + 1.8157749894560994861j), tol=ATOL)
  797. assert ae(v.real, 20.880034621432138988, tol=PTOL)
  798. assert ae(v.imag, 1.8157749894560994861, tol=PTOL)
  799. v = fp.e1((-0.25 - 1.0j))
  800. assert ae(v, (-0.59066621214766308594 + 0.74474454765205036972j), tol=ATOL)
  801. assert ae(v.real, -0.59066621214766308594, tol=PTOL)
  802. assert ae(v.imag, 0.74474454765205036972, tol=PTOL)
  803. v = fp.e1((-1.0 - 4.0j))
  804. assert ae(v, (0.49739047283060471093 - 0.41543605404038863174j), tol=ATOL)
  805. assert ae(v.real, 0.49739047283060471093, tol=PTOL)
  806. assert ae(v.imag, -0.41543605404038863174, tol=PTOL)
  807. v = fp.e1((-2.0 - 8.0j))
  808. assert ae(v, (-0.8705211147733730969 - 0.24099328498605539667j), tol=ATOL)
  809. assert ae(v.real, -0.8705211147733730969, tol=PTOL)
  810. assert ae(v.imag, -0.24099328498605539667, tol=PTOL)
  811. v = fp.e1((-5.0 - 20.0j))
  812. assert ae(v, (-7.0789514293925893007 + 1.6102177171960790536j), tol=ATOL)
  813. assert ae(v.real, -7.0789514293925893007, tol=PTOL)
  814. assert ae(v.imag, 1.6102177171960790536, tol=PTOL)
  815. v = fp.e1((-20.0 - 80.0j))
  816. assert ae(v, (5855431.4907298084434 + 720920.93315409165707j), tol=ATOL)
  817. assert ae(v.real, 5855431.4907298084434, tol=PTOL)
  818. assert ae(v.imag, 720920.93315409165707, tol=PTOL)
  819. v = fp.e1((-30.0 - 120.0j))
  820. assert ae(v, (-65402491644.703470747 + 56697658399.657460294j), tol=ATOL)
  821. assert ae(v.real, -65402491644.703470747, tol=PTOL)
  822. assert ae(v.imag, 56697658399.657460294, tol=PTOL)
  823. v = fp.e1((-40.0 - 160.0j))
  824. assert ae(v, (25504929379604.776769 - 1429035198630573.2463j), tol=ATOL)
  825. assert ae(v.real, 25504929379604.776769, tol=PTOL)
  826. assert ae(v.imag, -1429035198630573.2463, tol=PTOL)
  827. v = fp.e1((-50.0 - 200.0j))
  828. assert ae(v, (18437746526988116954.0 + 17146362239046152345.0j), tol=ATOL)
  829. assert ae(v.real, 18437746526988116954.0, tol=PTOL)
  830. assert ae(v.imag, 17146362239046152345.0, tol=PTOL)
  831. v = fp.e1((-80.0 - 320.0j))
  832. assert ae(v, (3.3464697299634526706e+31 + 1.6473152633843023919e+32j), tol=ATOL)
  833. assert ae(v.real, 3.3464697299634526706e+31, tol=PTOL)
  834. assert ae(v.imag, 1.6473152633843023919e+32, tol=PTOL)
  835. v = fp.e1((0.0 - 1.1641532182693481445e-10j))
  836. assert ae(v, (22.29664129357666235 + 1.5707963266784812974j), tol=ATOL)
  837. assert ae(v.real, 22.29664129357666235, tol=PTOL)
  838. assert ae(v.imag, 1.5707963266784812974, tol=PTOL)
  839. v = fp.e1((0.0 - 0.25j))
  840. assert ae(v, (0.82466306258094565309 + 1.3216627564751394551j), tol=ATOL)
  841. assert ae(v.real, 0.82466306258094565309, tol=PTOL)
  842. assert ae(v.imag, 1.3216627564751394551, tol=PTOL)
  843. v = fp.e1((0.0 - 1.0j))
  844. assert ae(v, (-0.33740392290096813466 + 0.62471325642771360429j), tol=ATOL)
  845. assert ae(v.real, -0.33740392290096813466, tol=PTOL)
  846. assert ae(v.imag, 0.62471325642771360429, tol=PTOL)
  847. v = fp.e1((0.0 - 2.0j))
  848. assert ae(v, (-0.4229808287748649957 - 0.034616650007798229345j), tol=ATOL)
  849. assert ae(v.real, -0.4229808287748649957, tol=PTOL)
  850. assert ae(v.imag, -0.034616650007798229345, tol=PTOL)
  851. v = fp.e1((0.0 - 5.0j))
  852. assert ae(v, (0.19002974965664387862 + 0.020865081850222481957j), tol=ATOL)
  853. assert ae(v.real, 0.19002974965664387862, tol=PTOL)
  854. assert ae(v.imag, 0.020865081850222481957, tol=PTOL)
  855. v = fp.e1((0.0 - 20.0j))
  856. assert ae(v, (-0.04441982084535331654 + 0.022554625751456779068j), tol=ATOL)
  857. assert ae(v.real, -0.04441982084535331654, tol=PTOL)
  858. assert ae(v.imag, 0.022554625751456779068, tol=PTOL)
  859. v = fp.e1((0.0 - 30.0j))
  860. assert ae(v, (0.033032417282071143779 + 0.0040397867645455082476j), tol=ATOL)
  861. assert ae(v.real, 0.033032417282071143779, tol=PTOL)
  862. assert ae(v.imag, 0.0040397867645455082476, tol=PTOL)
  863. v = fp.e1((0.0 - 40.0j))
  864. assert ae(v, (-0.019020007896208766962 - 0.016188792559887887544j), tol=ATOL)
  865. assert ae(v.real, -0.019020007896208766962, tol=PTOL)
  866. assert ae(v.imag, -0.016188792559887887544, tol=PTOL)
  867. v = fp.e1((0.0 - 50.0j))
  868. assert ae(v, (0.0056283863241163054402 + 0.019179254308960724503j), tol=ATOL)
  869. assert ae(v.real, 0.0056283863241163054402, tol=PTOL)
  870. assert ae(v.imag, 0.019179254308960724503, tol=PTOL)
  871. v = fp.e1((0.0 - 80.0j))
  872. assert ae(v, (0.012402501155070958192 - 0.0015345601175906961199j), tol=ATOL)
  873. assert ae(v.real, 0.012402501155070958192, tol=PTOL)
  874. assert ae(v.imag, -0.0015345601175906961199, tol=PTOL)
  875. v = fp.e1((1.1641532182693481445e-10 - 4.6566128730773925781e-10j))
  876. assert ae(v, (20.880034621664969632 + 1.3258176632023711778j), tol=ATOL)
  877. assert ae(v.real, 20.880034621664969632, tol=PTOL)
  878. assert ae(v.imag, 1.3258176632023711778, tol=PTOL)
  879. v = fp.e1((0.25 - 1.0j))
  880. assert ae(v, (-0.16868306393667788761 + 0.4858011885947426971j), tol=ATOL)
  881. assert ae(v.real, -0.16868306393667788761, tol=PTOL)
  882. assert ae(v.imag, 0.4858011885947426971, tol=PTOL)
  883. v = fp.e1((1.0 - 4.0j))
  884. assert ae(v, (0.03373591813926547318 - 0.073523452241083821877j), tol=ATOL)
  885. assert ae(v.real, 0.03373591813926547318, tol=PTOL)
  886. assert ae(v.imag, -0.073523452241083821877, tol=PTOL)
  887. v = fp.e1((2.0 - 8.0j))
  888. assert ae(v, (-0.015392833434733785143 + 0.0031747121557605415914j), tol=ATOL)
  889. assert ae(v.real, -0.015392833434733785143, tol=PTOL)
  890. assert ae(v.imag, 0.0031747121557605415914, tol=PTOL)
  891. v = fp.e1((5.0 - 20.0j))
  892. assert ae(v, (-0.00024419662286542966525 + 0.00021008322966152755674j), tol=ATOL)
  893. assert ae(v.real, -0.00024419662286542966525, tol=PTOL)
  894. assert ae(v.imag, 0.00021008322966152755674, tol=PTOL)
  895. v = fp.e1((20.0 - 80.0j))
  896. assert ae(v, (2.3255552781051330088e-11 - 8.9463918891349438007e-12j), tol=ATOL)
  897. assert ae(v.real, 2.3255552781051330088e-11, tol=PTOL)
  898. assert ae(v.imag, -8.9463918891349438007e-12, tol=PTOL)
  899. v = fp.e1((30.0 - 120.0j))
  900. assert ae(v, (-2.7068919097124652332e-16 + 7.0477762411705130239e-16j), tol=ATOL)
  901. assert ae(v.real, -2.7068919097124652332e-16, tol=PTOL)
  902. assert ae(v.imag, 7.0477762411705130239e-16, tol=PTOL)
  903. v = fp.e1((40.0 - 160.0j))
  904. assert ae(v, (-1.1695597827678024687e-20 - 2.2907401455645736661e-20j), tol=ATOL)
  905. assert ae(v.real, -1.1695597827678024687e-20, tol=PTOL)
  906. assert ae(v.imag, -2.2907401455645736661e-20, tol=PTOL)
  907. v = fp.e1((50.0 - 200.0j))
  908. assert ae(v, (9.0323746914410162531e-25 + 2.3950601790033530935e-25j), tol=ATOL)
  909. assert ae(v.real, 9.0323746914410162531e-25, tol=PTOL)
  910. assert ae(v.imag, 2.3950601790033530935e-25, tol=PTOL)
  911. v = fp.e1((80.0 - 320.0j))
  912. assert ae(v, (3.4819106748728063576e-38 + 4.215653005615772724e-38j), tol=ATOL)
  913. assert ae(v.real, 3.4819106748728063576e-38, tol=PTOL)
  914. assert ae(v.imag, 4.215653005615772724e-38, tol=PTOL)
  915. v = fp.e1((1.1641532182693481445e-10 - 1.1641532182693481445e-10j))
  916. assert ae(v, (21.950067703413105017 + 0.7853981632810329878j), tol=ATOL)
  917. assert ae(v.real, 21.950067703413105017, tol=PTOL)
  918. assert ae(v.imag, 0.7853981632810329878, tol=PTOL)
  919. v = fp.e1((0.25 - 0.25j))
  920. assert ae(v, (0.71092525792923287894 + 0.56491812441304194711j), tol=ATOL)
  921. assert ae(v.real, 0.71092525792923287894, tol=PTOL)
  922. assert ae(v.imag, 0.56491812441304194711, tol=PTOL)
  923. v = fp.e1((1.0 - 1.0j))
  924. assert ae(v, (0.00028162445198141832551 + 0.17932453503935894015j), tol=ATOL)
  925. assert ae(v.real, 0.00028162445198141832551, tol=PTOL)
  926. assert ae(v.imag, 0.17932453503935894015, tol=PTOL)
  927. v = fp.e1((2.0 - 2.0j))
  928. assert ae(v, (-0.033767089606562004246 + 0.018599414169750541925j), tol=ATOL)
  929. assert ae(v.real, -0.033767089606562004246, tol=PTOL)
  930. assert ae(v.imag, 0.018599414169750541925, tol=PTOL)
  931. v = fp.e1((5.0 - 5.0j))
  932. assert ae(v, (0.0007266506660356393891 - 0.00047102780163522245054j), tol=ATOL)
  933. assert ae(v.real, 0.0007266506660356393891, tol=PTOL)
  934. assert ae(v.imag, -0.00047102780163522245054, tol=PTOL)
  935. v = fp.e1((20.0 - 20.0j))
  936. assert ae(v, (-2.3824537449367396579e-11 + 6.6969873156525615158e-11j), tol=ATOL)
  937. assert ae(v.real, -2.3824537449367396579e-11, tol=PTOL)
  938. assert ae(v.imag, 6.6969873156525615158e-11, tol=PTOL)
  939. v = fp.e1((30.0 - 30.0j))
  940. assert ae(v, (1.7316045841744061617e-15 - 1.3065678019487308689e-15j), tol=ATOL)
  941. assert ae(v.real, 1.7316045841744061617e-15, tol=PTOL)
  942. assert ae(v.imag, -1.3065678019487308689e-15, tol=PTOL)
  943. v = fp.e1((40.0 - 40.0j))
  944. assert ae(v, (-7.4001043002899232182e-20 + 4.991847855336816304e-21j), tol=ATOL)
  945. assert ae(v.real, -7.4001043002899232182e-20, tol=PTOL)
  946. assert ae(v.imag, 4.991847855336816304e-21, tol=PTOL)
  947. v = fp.e1((50.0 - 50.0j))
  948. assert ae(v, (2.3566128324644641219e-24 + 1.3188326726201614778e-24j), tol=ATOL)
  949. assert ae(v.real, 2.3566128324644641219e-24, tol=PTOL)
  950. assert ae(v.imag, 1.3188326726201614778e-24, tol=PTOL)
  951. v = fp.e1((80.0 - 80.0j))
  952. assert ae(v, (9.8279750572186526673e-38 - 1.243952841288868831e-37j), tol=ATOL)
  953. assert ae(v.real, 9.8279750572186526673e-38, tol=PTOL)
  954. assert ae(v.imag, -1.243952841288868831e-37, tol=PTOL)
  955. v = fp.e1((4.6566128730773925781e-10 - 1.1641532182693481445e-10j))
  956. assert ae(v, (20.880034622014215597 + 0.24497866301044883237j), tol=ATOL)
  957. assert ae(v.real, 20.880034622014215597, tol=PTOL)
  958. assert ae(v.imag, 0.24497866301044883237, tol=PTOL)
  959. v = fp.e1((1.0 - 0.25j))
  960. assert ae(v, (0.19731063945004229095 + 0.087366045774299963672j), tol=ATOL)
  961. assert ae(v.real, 0.19731063945004229095, tol=PTOL)
  962. assert ae(v.imag, 0.087366045774299963672, tol=PTOL)
  963. v = fp.e1((4.0 - 1.0j))
  964. assert ae(v, (0.0013106173980145506944 + 0.0034542480199350626699j), tol=ATOL)
  965. assert ae(v.real, 0.0013106173980145506944, tol=PTOL)
  966. assert ae(v.imag, 0.0034542480199350626699, tol=PTOL)
  967. v = fp.e1((8.0 - 2.0j))
  968. assert ae(v, (-0.000022278049065270225945 + 0.000029191940456521555288j), tol=ATOL)
  969. assert ae(v.real, -0.000022278049065270225945, tol=PTOL)
  970. assert ae(v.imag, 0.000029191940456521555288, tol=PTOL)
  971. v = fp.e1((20.0 - 5.0j))
  972. assert ae(v, (4.7711374515765346894e-11 - 8.2902652405126947359e-11j), tol=ATOL)
  973. assert ae(v.real, 4.7711374515765346894e-11, tol=PTOL)
  974. assert ae(v.imag, -8.2902652405126947359e-11, tol=PTOL)
  975. v = fp.e1((80.0 - 20.0j))
  976. assert ae(v, (3.8353473865788235787e-38 + 2.129247592349605139e-37j), tol=ATOL)
  977. assert ae(v.real, 3.8353473865788235787e-38, tol=PTOL)
  978. assert ae(v.imag, 2.129247592349605139e-37, tol=PTOL)
  979. v = fp.e1((120.0 - 30.0j))
  980. assert ae(v, (2.3836002337480334716e-55 - 5.6704043587126198306e-55j), tol=ATOL)
  981. assert ae(v.real, 2.3836002337480334716e-55, tol=PTOL)
  982. assert ae(v.imag, -5.6704043587126198306e-55, tol=PTOL)
  983. v = fp.e1((160.0 - 40.0j))
  984. assert ae(v, (-1.6238022898654510661e-72 + 1.104172355572287367e-72j), tol=ATOL)
  985. assert ae(v.real, -1.6238022898654510661e-72, tol=PTOL)
  986. assert ae(v.imag, 1.104172355572287367e-72, tol=PTOL)
  987. v = fp.e1((200.0 - 50.0j))
  988. assert ae(v, (6.6800061461666228487e-90 - 1.4473816083541016115e-91j), tol=ATOL)
  989. assert ae(v.real, 6.6800061461666228487e-90, tol=PTOL)
  990. assert ae(v.imag, -1.4473816083541016115e-91, tol=PTOL)
  991. v = fp.e1((320.0 - 80.0j))
  992. assert ae(v, (4.2737871527778786157e-143 - 3.1789935525785660314e-142j), tol=ATOL)
  993. assert ae(v.real, 4.2737871527778786157e-143, tol=PTOL)
  994. assert ae(v.imag, -3.1789935525785660314e-142, tol=PTOL)
  995. v = fp.ei(1.1641532182693481445e-10)
  996. assert ae(v, -22.296641293460247028, tol=ATOL)
  997. assert type(v) is float
  998. v = fp.ei(0.25)
  999. assert ae(v, -0.54254326466191372953, tol=ATOL)
  1000. assert type(v) is float
  1001. v = fp.ei(1.0)
  1002. assert ae(v, 1.8951178163559367555, tol=ATOL)
  1003. assert type(v) is float
  1004. v = fp.ei(2.0)
  1005. assert ae(v, 4.9542343560018901634, tol=ATOL)
  1006. assert type(v) is float
  1007. v = fp.ei(5.0)
  1008. assert ae(v, 40.185275355803177455, tol=ATOL)
  1009. assert type(v) is float
  1010. v = fp.ei(20.0)
  1011. assert ae(v, 25615652.66405658882, tol=ATOL)
  1012. assert type(v) is float
  1013. v = fp.ei(30.0)
  1014. assert ae(v, 368973209407.27419706, tol=ATOL)
  1015. assert type(v) is float
  1016. v = fp.ei(40.0)
  1017. assert ae(v, 6039718263611241.5784, tol=ATOL)
  1018. assert type(v) is float
  1019. v = fp.ei(50.0)
  1020. assert ae(v, 1.0585636897131690963e+20, tol=ATOL)
  1021. assert type(v) is float
  1022. v = fp.ei(80.0)
  1023. assert ae(v, 7.0146000049047999696e+32, tol=ATOL)
  1024. assert type(v) is float
  1025. v = fp.ei((1.1641532182693481445e-10 + 0.0j))
  1026. assert ae(v, (-22.296641293460247028 + 0.0j), tol=ATOL)
  1027. assert ae(v.real, -22.296641293460247028, tol=PTOL)
  1028. assert v.imag == 0
  1029. v = fp.ei((0.25 + 0.0j))
  1030. assert ae(v, (-0.54254326466191372953 + 0.0j), tol=ATOL)
  1031. assert ae(v.real, -0.54254326466191372953, tol=PTOL)
  1032. assert v.imag == 0
  1033. v = fp.ei((1.0 + 0.0j))
  1034. assert ae(v, (1.8951178163559367555 + 0.0j), tol=ATOL)
  1035. assert ae(v.real, 1.8951178163559367555, tol=PTOL)
  1036. assert v.imag == 0
  1037. v = fp.ei((2.0 + 0.0j))
  1038. assert ae(v, (4.9542343560018901634 + 0.0j), tol=ATOL)
  1039. assert ae(v.real, 4.9542343560018901634, tol=PTOL)
  1040. assert v.imag == 0
  1041. v = fp.ei((5.0 + 0.0j))
  1042. assert ae(v, (40.185275355803177455 + 0.0j), tol=ATOL)
  1043. assert ae(v.real, 40.185275355803177455, tol=PTOL)
  1044. assert v.imag == 0
  1045. v = fp.ei((20.0 + 0.0j))
  1046. assert ae(v, (25615652.66405658882 + 0.0j), tol=ATOL)
  1047. assert ae(v.real, 25615652.66405658882, tol=PTOL)
  1048. assert v.imag == 0
  1049. v = fp.ei((30.0 + 0.0j))
  1050. assert ae(v, (368973209407.27419706 + 0.0j), tol=ATOL)
  1051. assert ae(v.real, 368973209407.27419706, tol=PTOL)
  1052. assert v.imag == 0
  1053. v = fp.ei((40.0 + 0.0j))
  1054. assert ae(v, (6039718263611241.5784 + 0.0j), tol=ATOL)
  1055. assert ae(v.real, 6039718263611241.5784, tol=PTOL)
  1056. assert v.imag == 0
  1057. v = fp.ei((50.0 + 0.0j))
  1058. assert ae(v, (1.0585636897131690963e+20 + 0.0j), tol=ATOL)
  1059. assert ae(v.real, 1.0585636897131690963e+20, tol=PTOL)
  1060. assert v.imag == 0
  1061. v = fp.ei((80.0 + 0.0j))
  1062. assert ae(v, (7.0146000049047999696e+32 + 0.0j), tol=ATOL)
  1063. assert ae(v.real, 7.0146000049047999696e+32, tol=PTOL)
  1064. assert v.imag == 0
  1065. v = fp.ei((4.6566128730773925781e-10 + 1.1641532182693481445e-10j))
  1066. assert ae(v, (-20.880034621082893023 + 0.24497866324327947603j), tol=ATOL)
  1067. assert ae(v.real, -20.880034621082893023, tol=PTOL)
  1068. assert ae(v.imag, 0.24497866324327947603, tol=PTOL)
  1069. v = fp.ei((1.0 + 0.25j))
  1070. assert ae(v, (1.8942716983721074932 + 0.67268237088273915854j), tol=ATOL)
  1071. assert ae(v.real, 1.8942716983721074932, tol=PTOL)
  1072. assert ae(v.imag, 0.67268237088273915854, tol=PTOL)
  1073. v = fp.ei((4.0 + 1.0j))
  1074. assert ae(v, (14.806699492675420438 + 12.280015176673582616j), tol=ATOL)
  1075. assert ae(v.real, 14.806699492675420438, tol=PTOL)
  1076. assert ae(v.imag, 12.280015176673582616, tol=PTOL)
  1077. v = fp.ei((8.0 + 2.0j))
  1078. assert ae(v, (-54.633252667426386294 + 416.34477429173650012j), tol=ATOL)
  1079. assert ae(v.real, -54.633252667426386294, tol=PTOL)
  1080. assert ae(v.imag, 416.34477429173650012, tol=PTOL)
  1081. v = fp.ei((20.0 + 5.0j))
  1082. assert ae(v, (711836.97165402624643 - 24745247.798103247366j), tol=ATOL)
  1083. assert ae(v.real, 711836.97165402624643, tol=PTOL)
  1084. assert ae(v.imag, -24745247.798103247366, tol=PTOL)
  1085. v = fp.ei((80.0 + 20.0j))
  1086. assert ae(v, (4.2139911108612653091e+32 + 5.3367124741918251637e+32j), tol=ATOL)
  1087. assert ae(v.real, 4.2139911108612653091e+32, tol=PTOL)
  1088. assert ae(v.imag, 5.3367124741918251637e+32, tol=PTOL)
  1089. v = fp.ei((120.0 + 30.0j))
  1090. assert ae(v, (-9.7760616203707508892e+48 - 1.058257682317195792e+50j), tol=ATOL)
  1091. assert ae(v.real, -9.7760616203707508892e+48, tol=PTOL)
  1092. assert ae(v.imag, -1.058257682317195792e+50, tol=PTOL)
  1093. v = fp.ei((160.0 + 40.0j))
  1094. assert ae(v, (-8.7065541466623638861e+66 + 1.6577106725141739889e+67j), tol=ATOL)
  1095. assert ae(v.real, -8.7065541466623638861e+66, tol=PTOL)
  1096. assert ae(v.imag, 1.6577106725141739889e+67, tol=PTOL)
  1097. v = fp.ei((200.0 + 50.0j))
  1098. assert ae(v, (3.070744996327018106e+84 - 1.7243244846769415903e+84j), tol=ATOL)
  1099. assert ae(v.real, 3.070744996327018106e+84, tol=PTOL)
  1100. assert ae(v.imag, -1.7243244846769415903e+84, tol=PTOL)
  1101. v = fp.ei((320.0 + 80.0j))
  1102. assert ae(v, (-9.9960598637998647276e+135 - 2.6855081527595608863e+136j), tol=ATOL)
  1103. assert ae(v.real, -9.9960598637998647276e+135, tol=PTOL)
  1104. assert ae(v.imag, -2.6855081527595608863e+136, tol=PTOL)
  1105. v = fp.ei((1.1641532182693481445e-10 + 1.1641532182693481445e-10j))
  1106. assert ae(v, (-21.950067703180274374 + 0.78539816351386363145j), tol=ATOL)
  1107. assert ae(v.real, -21.950067703180274374, tol=PTOL)
  1108. assert ae(v.imag, 0.78539816351386363145, tol=PTOL)
  1109. v = fp.ei((0.25 + 0.25j))
  1110. assert ae(v, (-0.21441047326710323254 + 1.0683772981589995996j), tol=ATOL)
  1111. assert ae(v.real, -0.21441047326710323254, tol=PTOL)
  1112. assert ae(v.imag, 1.0683772981589995996, tol=PTOL)
  1113. v = fp.ei((1.0 + 1.0j))
  1114. assert ae(v, (1.7646259855638540684 + 2.3877698515105224193j), tol=ATOL)
  1115. assert ae(v.real, 1.7646259855638540684, tol=PTOL)
  1116. assert ae(v.imag, 2.3877698515105224193, tol=PTOL)
  1117. v = fp.ei((2.0 + 2.0j))
  1118. assert ae(v, (1.8920781621855474089 + 5.3169624378326579621j), tol=ATOL)
  1119. assert ae(v.real, 1.8920781621855474089, tol=PTOL)
  1120. assert ae(v.imag, 5.3169624378326579621, tol=PTOL)
  1121. v = fp.ei((5.0 + 5.0j))
  1122. assert ae(v, (-13.470936071475245856 - 15.322492395731230968j), tol=ATOL)
  1123. assert ae(v.real, -13.470936071475245856, tol=PTOL)
  1124. assert ae(v.imag, -15.322492395731230968, tol=PTOL)
  1125. v = fp.ei((20.0 + 20.0j))
  1126. assert ae(v, (16589317.398788971896 + 5831705.4712368307104j), tol=ATOL)
  1127. assert ae(v.real, 16589317.398788971896, tol=PTOL)
  1128. assert ae(v.imag, 5831705.4712368307104, tol=PTOL)
  1129. v = fp.ei((30.0 + 30.0j))
  1130. assert ae(v, (-154596484273.69322527 - 204179357834.2723043j), tol=ATOL)
  1131. assert ae(v.real, -154596484273.69322527, tol=PTOL)
  1132. assert ae(v.imag, -204179357834.2723043, tol=PTOL)
  1133. v = fp.ei((40.0 + 40.0j))
  1134. assert ae(v, (287512180321448.45408 + 4203502407932318.1156j), tol=ATOL)
  1135. assert ae(v.real, 287512180321448.45408, tol=PTOL)
  1136. assert ae(v.imag, 4203502407932318.1156, tol=PTOL)
  1137. v = fp.ei((50.0 + 50.0j))
  1138. assert ae(v, (36128528616649268826.0 - 64648801861338741960.0j), tol=ATOL)
  1139. assert ae(v.real, 36128528616649268826.0, tol=PTOL)
  1140. assert ae(v.imag, -64648801861338741960.0, tol=PTOL)
  1141. v = fp.ei((80.0 + 80.0j))
  1142. assert ae(v, (-3.8674816337930010217e+32 - 3.0540709639658071041e+32j), tol=ATOL)
  1143. assert ae(v.real, -3.8674816337930010217e+32, tol=PTOL)
  1144. assert ae(v.imag, -3.0540709639658071041e+32, tol=PTOL)
  1145. v = fp.ei((1.1641532182693481445e-10 + 4.6566128730773925781e-10j))
  1146. assert ae(v, (-20.880034621432138988 + 1.3258176641336937524j), tol=ATOL)
  1147. assert ae(v.real, -20.880034621432138988, tol=PTOL)
  1148. assert ae(v.imag, 1.3258176641336937524, tol=PTOL)
  1149. v = fp.ei((0.25 + 1.0j))
  1150. assert ae(v, (0.59066621214766308594 + 2.3968481059377428687j), tol=ATOL)
  1151. assert ae(v.real, 0.59066621214766308594, tol=PTOL)
  1152. assert ae(v.imag, 2.3968481059377428687, tol=PTOL)
  1153. v = fp.ei((1.0 + 4.0j))
  1154. assert ae(v, (-0.49739047283060471093 + 3.5570287076301818702j), tol=ATOL)
  1155. assert ae(v.real, -0.49739047283060471093, tol=PTOL)
  1156. assert ae(v.imag, 3.5570287076301818702, tol=PTOL)
  1157. v = fp.ei((2.0 + 8.0j))
  1158. assert ae(v, (0.8705211147733730969 + 3.3825859385758486351j), tol=ATOL)
  1159. assert ae(v.real, 0.8705211147733730969, tol=PTOL)
  1160. assert ae(v.imag, 3.3825859385758486351, tol=PTOL)
  1161. v = fp.ei((5.0 + 20.0j))
  1162. assert ae(v, (7.0789514293925893007 + 1.5313749363937141849j), tol=ATOL)
  1163. assert ae(v.real, 7.0789514293925893007, tol=PTOL)
  1164. assert ae(v.imag, 1.5313749363937141849, tol=PTOL)
  1165. v = fp.ei((20.0 + 80.0j))
  1166. assert ae(v, (-5855431.4907298084434 - 720917.79156143806727j), tol=ATOL)
  1167. assert ae(v.real, -5855431.4907298084434, tol=PTOL)
  1168. assert ae(v.imag, -720917.79156143806727, tol=PTOL)
  1169. v = fp.ei((30.0 + 120.0j))
  1170. assert ae(v, (65402491644.703470747 - 56697658396.51586764j), tol=ATOL)
  1171. assert ae(v.real, 65402491644.703470747, tol=PTOL)
  1172. assert ae(v.imag, -56697658396.51586764, tol=PTOL)
  1173. v = fp.ei((40.0 + 160.0j))
  1174. assert ae(v, (-25504929379604.776769 + 1429035198630576.3879j), tol=ATOL)
  1175. assert ae(v.real, -25504929379604.776769, tol=PTOL)
  1176. assert ae(v.imag, 1429035198630576.3879, tol=PTOL)
  1177. v = fp.ei((50.0 + 200.0j))
  1178. assert ae(v, (-18437746526988116954.0 - 17146362239046152342.0j), tol=ATOL)
  1179. assert ae(v.real, -18437746526988116954.0, tol=PTOL)
  1180. assert ae(v.imag, -17146362239046152342.0, tol=PTOL)
  1181. v = fp.ei((80.0 + 320.0j))
  1182. assert ae(v, (-3.3464697299634526706e+31 - 1.6473152633843023919e+32j), tol=ATOL)
  1183. assert ae(v.real, -3.3464697299634526706e+31, tol=PTOL)
  1184. assert ae(v.imag, -1.6473152633843023919e+32, tol=PTOL)
  1185. v = fp.ei((0.0 + 1.1641532182693481445e-10j))
  1186. assert ae(v, (-22.29664129357666235 + 1.5707963269113119411j), tol=ATOL)
  1187. assert ae(v.real, -22.29664129357666235, tol=PTOL)
  1188. assert ae(v.imag, 1.5707963269113119411, tol=PTOL)
  1189. v = fp.ei((0.0 + 0.25j))
  1190. assert ae(v, (-0.82466306258094565309 + 1.8199298971146537833j), tol=ATOL)
  1191. assert ae(v.real, -0.82466306258094565309, tol=PTOL)
  1192. assert ae(v.imag, 1.8199298971146537833, tol=PTOL)
  1193. v = fp.ei((0.0 + 1.0j))
  1194. assert ae(v, (0.33740392290096813466 + 2.5168793971620796342j), tol=ATOL)
  1195. assert ae(v.real, 0.33740392290096813466, tol=PTOL)
  1196. assert ae(v.imag, 2.5168793971620796342, tol=PTOL)
  1197. v = fp.ei((0.0 + 2.0j))
  1198. assert ae(v, (0.4229808287748649957 + 3.1762093035975914678j), tol=ATOL)
  1199. assert ae(v.real, 0.4229808287748649957, tol=PTOL)
  1200. assert ae(v.imag, 3.1762093035975914678, tol=PTOL)
  1201. v = fp.ei((0.0 + 5.0j))
  1202. assert ae(v, (-0.19002974965664387862 + 3.1207275717395707565j), tol=ATOL)
  1203. assert ae(v.real, -0.19002974965664387862, tol=PTOL)
  1204. assert ae(v.imag, 3.1207275717395707565, tol=PTOL)
  1205. v = fp.ei((0.0 + 20.0j))
  1206. assert ae(v, (0.04441982084535331654 + 3.1190380278383364594j), tol=ATOL)
  1207. assert ae(v.real, 0.04441982084535331654, tol=PTOL)
  1208. assert ae(v.imag, 3.1190380278383364594, tol=PTOL)
  1209. v = fp.ei((0.0 + 30.0j))
  1210. assert ae(v, (-0.033032417282071143779 + 3.1375528668252477302j), tol=ATOL)
  1211. assert ae(v.real, -0.033032417282071143779, tol=PTOL)
  1212. assert ae(v.imag, 3.1375528668252477302, tol=PTOL)
  1213. v = fp.ei((0.0 + 40.0j))
  1214. assert ae(v, (0.019020007896208766962 + 3.157781446149681126j), tol=ATOL)
  1215. assert ae(v.real, 0.019020007896208766962, tol=PTOL)
  1216. assert ae(v.imag, 3.157781446149681126, tol=PTOL)
  1217. v = fp.ei((0.0 + 50.0j))
  1218. assert ae(v, (-0.0056283863241163054402 + 3.122413399280832514j), tol=ATOL)
  1219. assert ae(v.real, -0.0056283863241163054402, tol=PTOL)
  1220. assert ae(v.imag, 3.122413399280832514, tol=PTOL)
  1221. v = fp.ei((0.0 + 80.0j))
  1222. assert ae(v, (-0.012402501155070958192 + 3.1431272137073839346j), tol=ATOL)
  1223. assert ae(v.real, -0.012402501155070958192, tol=PTOL)
  1224. assert ae(v.imag, 3.1431272137073839346, tol=PTOL)
  1225. v = fp.ei((-1.1641532182693481445e-10 + 4.6566128730773925781e-10j))
  1226. assert ae(v, (-20.880034621664969632 + 1.8157749903874220607j), tol=ATOL)
  1227. assert ae(v.real, -20.880034621664969632, tol=PTOL)
  1228. assert ae(v.imag, 1.8157749903874220607, tol=PTOL)
  1229. v = fp.ei((-0.25 + 1.0j))
  1230. assert ae(v, (0.16868306393667788761 + 2.6557914649950505414j), tol=ATOL)
  1231. assert ae(v.real, 0.16868306393667788761, tol=PTOL)
  1232. assert ae(v.imag, 2.6557914649950505414, tol=PTOL)
  1233. v = fp.ei((-1.0 + 4.0j))
  1234. assert ae(v, (-0.03373591813926547318 + 3.2151161058308770603j), tol=ATOL)
  1235. assert ae(v.real, -0.03373591813926547318, tol=PTOL)
  1236. assert ae(v.imag, 3.2151161058308770603, tol=PTOL)
  1237. v = fp.ei((-2.0 + 8.0j))
  1238. assert ae(v, (0.015392833434733785143 + 3.1384179414340326969j), tol=ATOL)
  1239. assert ae(v.real, 0.015392833434733785143, tol=PTOL)
  1240. assert ae(v.imag, 3.1384179414340326969, tol=PTOL)
  1241. v = fp.ei((-5.0 + 20.0j))
  1242. assert ae(v, (0.00024419662286542966525 + 3.1413825703601317109j), tol=ATOL)
  1243. assert ae(v.real, 0.00024419662286542966525, tol=PTOL)
  1244. assert ae(v.imag, 3.1413825703601317109, tol=PTOL)
  1245. v = fp.ei((-20.0 + 80.0j))
  1246. assert ae(v, (-2.3255552781051330088e-11 + 3.1415926535987396304j), tol=ATOL)
  1247. assert ae(v.real, -2.3255552781051330088e-11, tol=PTOL)
  1248. assert ae(v.imag, 3.1415926535987396304, tol=PTOL)
  1249. v = fp.ei((-30.0 + 120.0j))
  1250. assert ae(v, (2.7068919097124652332e-16 + 3.1415926535897925337j), tol=ATOL)
  1251. assert ae(v.real, 2.7068919097124652332e-16, tol=PTOL)
  1252. assert ae(v.imag, 3.1415926535897925337, tol=PTOL)
  1253. v = fp.ei((-40.0 + 160.0j))
  1254. assert ae(v, (1.1695597827678024687e-20 + 3.1415926535897932385j), tol=ATOL)
  1255. assert ae(v.real, 1.1695597827678024687e-20, tol=PTOL)
  1256. assert ae(v.imag, 3.1415926535897932385, tol=PTOL)
  1257. v = fp.ei((-50.0 + 200.0j))
  1258. assert ae(v, (-9.0323746914410162531e-25 + 3.1415926535897932385j), tol=ATOL)
  1259. assert ae(v.real, -9.0323746914410162531e-25, tol=PTOL)
  1260. assert ae(v.imag, 3.1415926535897932385, tol=PTOL)
  1261. v = fp.ei((-80.0 + 320.0j))
  1262. assert ae(v, (-3.4819106748728063576e-38 + 3.1415926535897932385j), tol=ATOL)
  1263. assert ae(v.real, -3.4819106748728063576e-38, tol=PTOL)
  1264. assert ae(v.imag, 3.1415926535897932385, tol=PTOL)
  1265. v = fp.ei((-4.6566128730773925781e-10 + 1.1641532182693481445e-10j))
  1266. assert ae(v, (-20.880034622014215597 + 2.8966139905793444061j), tol=ATOL)
  1267. assert ae(v.real, -20.880034622014215597, tol=PTOL)
  1268. assert ae(v.imag, 2.8966139905793444061, tol=PTOL)
  1269. v = fp.ei((-1.0 + 0.25j))
  1270. assert ae(v, (-0.19731063945004229095 + 3.0542266078154932748j), tol=ATOL)
  1271. assert ae(v.real, -0.19731063945004229095, tol=PTOL)
  1272. assert ae(v.imag, 3.0542266078154932748, tol=PTOL)
  1273. v = fp.ei((-4.0 + 1.0j))
  1274. assert ae(v, (-0.0013106173980145506944 + 3.1381384055698581758j), tol=ATOL)
  1275. assert ae(v.real, -0.0013106173980145506944, tol=PTOL)
  1276. assert ae(v.imag, 3.1381384055698581758, tol=PTOL)
  1277. v = fp.ei((-8.0 + 2.0j))
  1278. assert ae(v, (0.000022278049065270225945 + 3.1415634616493367169j), tol=ATOL)
  1279. assert ae(v.real, 0.000022278049065270225945, tol=PTOL)
  1280. assert ae(v.imag, 3.1415634616493367169, tol=PTOL)
  1281. v = fp.ei((-20.0 + 5.0j))
  1282. assert ae(v, (-4.7711374515765346894e-11 + 3.1415926536726958909j), tol=ATOL)
  1283. assert ae(v.real, -4.7711374515765346894e-11, tol=PTOL)
  1284. assert ae(v.imag, 3.1415926536726958909, tol=PTOL)
  1285. v = fp.ei((-80.0 + 20.0j))
  1286. assert ae(v, (-3.8353473865788235787e-38 + 3.1415926535897932385j), tol=ATOL)
  1287. assert ae(v.real, -3.8353473865788235787e-38, tol=PTOL)
  1288. assert ae(v.imag, 3.1415926535897932385, tol=PTOL)
  1289. v = fp.ei((-120.0 + 30.0j))
  1290. assert ae(v, (-2.3836002337480334716e-55 + 3.1415926535897932385j), tol=ATOL)
  1291. assert ae(v.real, -2.3836002337480334716e-55, tol=PTOL)
  1292. assert ae(v.imag, 3.1415926535897932385, tol=PTOL)
  1293. v = fp.ei((-160.0 + 40.0j))
  1294. assert ae(v, (1.6238022898654510661e-72 + 3.1415926535897932385j), tol=ATOL)
  1295. assert ae(v.real, 1.6238022898654510661e-72, tol=PTOL)
  1296. assert ae(v.imag, 3.1415926535897932385, tol=PTOL)
  1297. v = fp.ei((-200.0 + 50.0j))
  1298. assert ae(v, (-6.6800061461666228487e-90 + 3.1415926535897932385j), tol=ATOL)
  1299. assert ae(v.real, -6.6800061461666228487e-90, tol=PTOL)
  1300. assert ae(v.imag, 3.1415926535897932385, tol=PTOL)
  1301. v = fp.ei((-320.0 + 80.0j))
  1302. assert ae(v, (-4.2737871527778786157e-143 + 3.1415926535897932385j), tol=ATOL)
  1303. assert ae(v.real, -4.2737871527778786157e-143, tol=PTOL)
  1304. assert ae(v.imag, 3.1415926535897932385, tol=PTOL)
  1305. v = fp.ei(-1.1641532182693481445e-10)
  1306. assert ae(v, -22.296641293693077672, tol=ATOL)
  1307. assert type(v) is float
  1308. v = fp.ei(-0.25)
  1309. assert ae(v, -1.0442826344437381945, tol=ATOL)
  1310. assert type(v) is float
  1311. v = fp.ei(-1.0)
  1312. assert ae(v, -0.21938393439552027368, tol=ATOL)
  1313. assert type(v) is float
  1314. v = fp.ei(-2.0)
  1315. assert ae(v, -0.048900510708061119567, tol=ATOL)
  1316. assert type(v) is float
  1317. v = fp.ei(-5.0)
  1318. assert ae(v, -0.0011482955912753257973, tol=ATOL)
  1319. assert type(v) is float
  1320. v = fp.ei(-20.0)
  1321. assert ae(v, -9.8355252906498816904e-11, tol=ATOL)
  1322. assert type(v) is float
  1323. v = fp.ei(-30.0)
  1324. assert ae(v, -3.0215520106888125448e-15, tol=ATOL)
  1325. assert type(v) is float
  1326. v = fp.ei(-40.0)
  1327. assert ae(v, -1.0367732614516569722e-19, tol=ATOL)
  1328. assert type(v) is float
  1329. v = fp.ei(-50.0)
  1330. assert ae(v, -3.7832640295504590187e-24, tol=ATOL)
  1331. assert type(v) is float
  1332. v = fp.ei(-80.0)
  1333. assert ae(v, -2.2285432586884729112e-37, tol=ATOL)
  1334. assert type(v) is float
  1335. v = fp.ei((-1.1641532182693481445e-10 + 0.0j))
  1336. assert ae(v, (-22.296641293693077672 + 0.0j), tol=ATOL)
  1337. assert ae(v.real, -22.296641293693077672, tol=PTOL)
  1338. assert v.imag == 0
  1339. v = fp.ei((-0.25 + 0.0j))
  1340. assert ae(v, (-1.0442826344437381945 + 0.0j), tol=ATOL)
  1341. assert ae(v.real, -1.0442826344437381945, tol=PTOL)
  1342. assert v.imag == 0
  1343. v = fp.ei((-1.0 + 0.0j))
  1344. assert ae(v, (-0.21938393439552027368 + 0.0j), tol=ATOL)
  1345. assert ae(v.real, -0.21938393439552027368, tol=PTOL)
  1346. assert v.imag == 0
  1347. v = fp.ei((-2.0 + 0.0j))
  1348. assert ae(v, (-0.048900510708061119567 + 0.0j), tol=ATOL)
  1349. assert ae(v.real, -0.048900510708061119567, tol=PTOL)
  1350. assert v.imag == 0
  1351. v = fp.ei((-5.0 + 0.0j))
  1352. assert ae(v, (-0.0011482955912753257973 + 0.0j), tol=ATOL)
  1353. assert ae(v.real, -0.0011482955912753257973, tol=PTOL)
  1354. assert v.imag == 0
  1355. v = fp.ei((-20.0 + 0.0j))
  1356. assert ae(v, (-9.8355252906498816904e-11 + 0.0j), tol=ATOL)
  1357. assert ae(v.real, -9.8355252906498816904e-11, tol=PTOL)
  1358. assert v.imag == 0
  1359. v = fp.ei((-30.0 + 0.0j))
  1360. assert ae(v, (-3.0215520106888125448e-15 + 0.0j), tol=ATOL)
  1361. assert ae(v.real, -3.0215520106888125448e-15, tol=PTOL)
  1362. assert v.imag == 0
  1363. v = fp.ei((-40.0 + 0.0j))
  1364. assert ae(v, (-1.0367732614516569722e-19 + 0.0j), tol=ATOL)
  1365. assert ae(v.real, -1.0367732614516569722e-19, tol=PTOL)
  1366. assert v.imag == 0
  1367. v = fp.ei((-50.0 + 0.0j))
  1368. assert ae(v, (-3.7832640295504590187e-24 + 0.0j), tol=ATOL)
  1369. assert ae(v.real, -3.7832640295504590187e-24, tol=PTOL)
  1370. assert v.imag == 0
  1371. v = fp.ei((-80.0 + 0.0j))
  1372. assert ae(v, (-2.2285432586884729112e-37 + 0.0j), tol=ATOL)
  1373. assert ae(v.real, -2.2285432586884729112e-37, tol=PTOL)
  1374. assert v.imag == 0
  1375. v = fp.ei((-4.6566128730773925781e-10 - 1.1641532182693481445e-10j))
  1376. assert ae(v, (-20.880034622014215597 - 2.8966139905793444061j), tol=ATOL)
  1377. assert ae(v.real, -20.880034622014215597, tol=PTOL)
  1378. assert ae(v.imag, -2.8966139905793444061, tol=PTOL)
  1379. v = fp.ei((-1.0 - 0.25j))
  1380. assert ae(v, (-0.19731063945004229095 - 3.0542266078154932748j), tol=ATOL)
  1381. assert ae(v.real, -0.19731063945004229095, tol=PTOL)
  1382. assert ae(v.imag, -3.0542266078154932748, tol=PTOL)
  1383. v = fp.ei((-4.0 - 1.0j))
  1384. assert ae(v, (-0.0013106173980145506944 - 3.1381384055698581758j), tol=ATOL)
  1385. assert ae(v.real, -0.0013106173980145506944, tol=PTOL)
  1386. assert ae(v.imag, -3.1381384055698581758, tol=PTOL)
  1387. v = fp.ei((-8.0 - 2.0j))
  1388. assert ae(v, (0.000022278049065270225945 - 3.1415634616493367169j), tol=ATOL)
  1389. assert ae(v.real, 0.000022278049065270225945, tol=PTOL)
  1390. assert ae(v.imag, -3.1415634616493367169, tol=PTOL)
  1391. v = fp.ei((-20.0 - 5.0j))
  1392. assert ae(v, (-4.7711374515765346894e-11 - 3.1415926536726958909j), tol=ATOL)
  1393. assert ae(v.real, -4.7711374515765346894e-11, tol=PTOL)
  1394. assert ae(v.imag, -3.1415926536726958909, tol=PTOL)
  1395. v = fp.ei((-80.0 - 20.0j))
  1396. assert ae(v, (-3.8353473865788235787e-38 - 3.1415926535897932385j), tol=ATOL)
  1397. assert ae(v.real, -3.8353473865788235787e-38, tol=PTOL)
  1398. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1399. v = fp.ei((-120.0 - 30.0j))
  1400. assert ae(v, (-2.3836002337480334716e-55 - 3.1415926535897932385j), tol=ATOL)
  1401. assert ae(v.real, -2.3836002337480334716e-55, tol=PTOL)
  1402. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1403. v = fp.ei((-160.0 - 40.0j))
  1404. assert ae(v, (1.6238022898654510661e-72 - 3.1415926535897932385j), tol=ATOL)
  1405. assert ae(v.real, 1.6238022898654510661e-72, tol=PTOL)
  1406. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1407. v = fp.ei((-200.0 - 50.0j))
  1408. assert ae(v, (-6.6800061461666228487e-90 - 3.1415926535897932385j), tol=ATOL)
  1409. assert ae(v.real, -6.6800061461666228487e-90, tol=PTOL)
  1410. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1411. v = fp.ei((-320.0 - 80.0j))
  1412. assert ae(v, (-4.2737871527778786157e-143 - 3.1415926535897932385j), tol=ATOL)
  1413. assert ae(v.real, -4.2737871527778786157e-143, tol=PTOL)
  1414. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1415. v = fp.ei((-1.1641532182693481445e-10 - 1.1641532182693481445e-10j))
  1416. assert ae(v, (-21.950067703413105017 - 2.3561944903087602507j), tol=ATOL)
  1417. assert ae(v.real, -21.950067703413105017, tol=PTOL)
  1418. assert ae(v.imag, -2.3561944903087602507, tol=PTOL)
  1419. v = fp.ei((-0.25 - 0.25j))
  1420. assert ae(v, (-0.71092525792923287894 - 2.5766745291767512913j), tol=ATOL)
  1421. assert ae(v.real, -0.71092525792923287894, tol=PTOL)
  1422. assert ae(v.imag, -2.5766745291767512913, tol=PTOL)
  1423. v = fp.ei((-1.0 - 1.0j))
  1424. assert ae(v, (-0.00028162445198141832551 - 2.9622681185504342983j), tol=ATOL)
  1425. assert ae(v.real, -0.00028162445198141832551, tol=PTOL)
  1426. assert ae(v.imag, -2.9622681185504342983, tol=PTOL)
  1427. v = fp.ei((-2.0 - 2.0j))
  1428. assert ae(v, (0.033767089606562004246 - 3.1229932394200426965j), tol=ATOL)
  1429. assert ae(v.real, 0.033767089606562004246, tol=PTOL)
  1430. assert ae(v.imag, -3.1229932394200426965, tol=PTOL)
  1431. v = fp.ei((-5.0 - 5.0j))
  1432. assert ae(v, (-0.0007266506660356393891 - 3.1420636813914284609j), tol=ATOL)
  1433. assert ae(v.real, -0.0007266506660356393891, tol=PTOL)
  1434. assert ae(v.imag, -3.1420636813914284609, tol=PTOL)
  1435. v = fp.ei((-20.0 - 20.0j))
  1436. assert ae(v, (2.3824537449367396579e-11 - 3.1415926535228233653j), tol=ATOL)
  1437. assert ae(v.real, 2.3824537449367396579e-11, tol=PTOL)
  1438. assert ae(v.imag, -3.1415926535228233653, tol=PTOL)
  1439. v = fp.ei((-30.0 - 30.0j))
  1440. assert ae(v, (-1.7316045841744061617e-15 - 3.141592653589794545j), tol=ATOL)
  1441. assert ae(v.real, -1.7316045841744061617e-15, tol=PTOL)
  1442. assert ae(v.imag, -3.141592653589794545, tol=PTOL)
  1443. v = fp.ei((-40.0 - 40.0j))
  1444. assert ae(v, (7.4001043002899232182e-20 - 3.1415926535897932385j), tol=ATOL)
  1445. assert ae(v.real, 7.4001043002899232182e-20, tol=PTOL)
  1446. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1447. v = fp.ei((-50.0 - 50.0j))
  1448. assert ae(v, (-2.3566128324644641219e-24 - 3.1415926535897932385j), tol=ATOL)
  1449. assert ae(v.real, -2.3566128324644641219e-24, tol=PTOL)
  1450. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1451. v = fp.ei((-80.0 - 80.0j))
  1452. assert ae(v, (-9.8279750572186526673e-38 - 3.1415926535897932385j), tol=ATOL)
  1453. assert ae(v.real, -9.8279750572186526673e-38, tol=PTOL)
  1454. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1455. v = fp.ei((-1.1641532182693481445e-10 - 4.6566128730773925781e-10j))
  1456. assert ae(v, (-20.880034621664969632 - 1.8157749903874220607j), tol=ATOL)
  1457. assert ae(v.real, -20.880034621664969632, tol=PTOL)
  1458. assert ae(v.imag, -1.8157749903874220607, tol=PTOL)
  1459. v = fp.ei((-0.25 - 1.0j))
  1460. assert ae(v, (0.16868306393667788761 - 2.6557914649950505414j), tol=ATOL)
  1461. assert ae(v.real, 0.16868306393667788761, tol=PTOL)
  1462. assert ae(v.imag, -2.6557914649950505414, tol=PTOL)
  1463. v = fp.ei((-1.0 - 4.0j))
  1464. assert ae(v, (-0.03373591813926547318 - 3.2151161058308770603j), tol=ATOL)
  1465. assert ae(v.real, -0.03373591813926547318, tol=PTOL)
  1466. assert ae(v.imag, -3.2151161058308770603, tol=PTOL)
  1467. v = fp.ei((-2.0 - 8.0j))
  1468. assert ae(v, (0.015392833434733785143 - 3.1384179414340326969j), tol=ATOL)
  1469. assert ae(v.real, 0.015392833434733785143, tol=PTOL)
  1470. assert ae(v.imag, -3.1384179414340326969, tol=PTOL)
  1471. v = fp.ei((-5.0 - 20.0j))
  1472. assert ae(v, (0.00024419662286542966525 - 3.1413825703601317109j), tol=ATOL)
  1473. assert ae(v.real, 0.00024419662286542966525, tol=PTOL)
  1474. assert ae(v.imag, -3.1413825703601317109, tol=PTOL)
  1475. v = fp.ei((-20.0 - 80.0j))
  1476. assert ae(v, (-2.3255552781051330088e-11 - 3.1415926535987396304j), tol=ATOL)
  1477. assert ae(v.real, -2.3255552781051330088e-11, tol=PTOL)
  1478. assert ae(v.imag, -3.1415926535987396304, tol=PTOL)
  1479. v = fp.ei((-30.0 - 120.0j))
  1480. assert ae(v, (2.7068919097124652332e-16 - 3.1415926535897925337j), tol=ATOL)
  1481. assert ae(v.real, 2.7068919097124652332e-16, tol=PTOL)
  1482. assert ae(v.imag, -3.1415926535897925337, tol=PTOL)
  1483. v = fp.ei((-40.0 - 160.0j))
  1484. assert ae(v, (1.1695597827678024687e-20 - 3.1415926535897932385j), tol=ATOL)
  1485. assert ae(v.real, 1.1695597827678024687e-20, tol=PTOL)
  1486. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1487. v = fp.ei((-50.0 - 200.0j))
  1488. assert ae(v, (-9.0323746914410162531e-25 - 3.1415926535897932385j), tol=ATOL)
  1489. assert ae(v.real, -9.0323746914410162531e-25, tol=PTOL)
  1490. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1491. v = fp.ei((-80.0 - 320.0j))
  1492. assert ae(v, (-3.4819106748728063576e-38 - 3.1415926535897932385j), tol=ATOL)
  1493. assert ae(v.real, -3.4819106748728063576e-38, tol=PTOL)
  1494. assert ae(v.imag, -3.1415926535897932385, tol=PTOL)
  1495. v = fp.ei((0.0 - 1.1641532182693481445e-10j))
  1496. assert ae(v, (-22.29664129357666235 - 1.5707963269113119411j), tol=ATOL)
  1497. assert ae(v.real, -22.29664129357666235, tol=PTOL)
  1498. assert ae(v.imag, -1.5707963269113119411, tol=PTOL)
  1499. v = fp.ei((0.0 - 0.25j))
  1500. assert ae(v, (-0.82466306258094565309 - 1.8199298971146537833j), tol=ATOL)
  1501. assert ae(v.real, -0.82466306258094565309, tol=PTOL)
  1502. assert ae(v.imag, -1.8199298971146537833, tol=PTOL)
  1503. v = fp.ei((0.0 - 1.0j))
  1504. assert ae(v, (0.33740392290096813466 - 2.5168793971620796342j), tol=ATOL)
  1505. assert ae(v.real, 0.33740392290096813466, tol=PTOL)
  1506. assert ae(v.imag, -2.5168793971620796342, tol=PTOL)
  1507. v = fp.ei((0.0 - 2.0j))
  1508. assert ae(v, (0.4229808287748649957 - 3.1762093035975914678j), tol=ATOL)
  1509. assert ae(v.real, 0.4229808287748649957, tol=PTOL)
  1510. assert ae(v.imag, -3.1762093035975914678, tol=PTOL)
  1511. v = fp.ei((0.0 - 5.0j))
  1512. assert ae(v, (-0.19002974965664387862 - 3.1207275717395707565j), tol=ATOL)
  1513. assert ae(v.real, -0.19002974965664387862, tol=PTOL)
  1514. assert ae(v.imag, -3.1207275717395707565, tol=PTOL)
  1515. v = fp.ei((0.0 - 20.0j))
  1516. assert ae(v, (0.04441982084535331654 - 3.1190380278383364594j), tol=ATOL)
  1517. assert ae(v.real, 0.04441982084535331654, tol=PTOL)
  1518. assert ae(v.imag, -3.1190380278383364594, tol=PTOL)
  1519. v = fp.ei((0.0 - 30.0j))
  1520. assert ae(v, (-0.033032417282071143779 - 3.1375528668252477302j), tol=ATOL)
  1521. assert ae(v.real, -0.033032417282071143779, tol=PTOL)
  1522. assert ae(v.imag, -3.1375528668252477302, tol=PTOL)
  1523. v = fp.ei((0.0 - 40.0j))
  1524. assert ae(v, (0.019020007896208766962 - 3.157781446149681126j), tol=ATOL)
  1525. assert ae(v.real, 0.019020007896208766962, tol=PTOL)
  1526. assert ae(v.imag, -3.157781446149681126, tol=PTOL)
  1527. v = fp.ei((0.0 - 50.0j))
  1528. assert ae(v, (-0.0056283863241163054402 - 3.122413399280832514j), tol=ATOL)
  1529. assert ae(v.real, -0.0056283863241163054402, tol=PTOL)
  1530. assert ae(v.imag, -3.122413399280832514, tol=PTOL)
  1531. v = fp.ei((0.0 - 80.0j))
  1532. assert ae(v, (-0.012402501155070958192 - 3.1431272137073839346j), tol=ATOL)
  1533. assert ae(v.real, -0.012402501155070958192, tol=PTOL)
  1534. assert ae(v.imag, -3.1431272137073839346, tol=PTOL)
  1535. v = fp.ei((1.1641532182693481445e-10 - 4.6566128730773925781e-10j))
  1536. assert ae(v, (-20.880034621432138988 - 1.3258176641336937524j), tol=ATOL)
  1537. assert ae(v.real, -20.880034621432138988, tol=PTOL)
  1538. assert ae(v.imag, -1.3258176641336937524, tol=PTOL)
  1539. v = fp.ei((0.25 - 1.0j))
  1540. assert ae(v, (0.59066621214766308594 - 2.3968481059377428687j), tol=ATOL)
  1541. assert ae(v.real, 0.59066621214766308594, tol=PTOL)
  1542. assert ae(v.imag, -2.3968481059377428687, tol=PTOL)
  1543. v = fp.ei((1.0 - 4.0j))
  1544. assert ae(v, (-0.49739047283060471093 - 3.5570287076301818702j), tol=ATOL)
  1545. assert ae(v.real, -0.49739047283060471093, tol=PTOL)
  1546. assert ae(v.imag, -3.5570287076301818702, tol=PTOL)
  1547. v = fp.ei((2.0 - 8.0j))
  1548. assert ae(v, (0.8705211147733730969 - 3.3825859385758486351j), tol=ATOL)
  1549. assert ae(v.real, 0.8705211147733730969, tol=PTOL)
  1550. assert ae(v.imag, -3.3825859385758486351, tol=PTOL)
  1551. v = fp.ei((5.0 - 20.0j))
  1552. assert ae(v, (7.0789514293925893007 - 1.5313749363937141849j), tol=ATOL)
  1553. assert ae(v.real, 7.0789514293925893007, tol=PTOL)
  1554. assert ae(v.imag, -1.5313749363937141849, tol=PTOL)
  1555. v = fp.ei((20.0 - 80.0j))
  1556. assert ae(v, (-5855431.4907298084434 + 720917.79156143806727j), tol=ATOL)
  1557. assert ae(v.real, -5855431.4907298084434, tol=PTOL)
  1558. assert ae(v.imag, 720917.79156143806727, tol=PTOL)
  1559. v = fp.ei((30.0 - 120.0j))
  1560. assert ae(v, (65402491644.703470747 + 56697658396.51586764j), tol=ATOL)
  1561. assert ae(v.real, 65402491644.703470747, tol=PTOL)
  1562. assert ae(v.imag, 56697658396.51586764, tol=PTOL)
  1563. v = fp.ei((40.0 - 160.0j))
  1564. assert ae(v, (-25504929379604.776769 - 1429035198630576.3879j), tol=ATOL)
  1565. assert ae(v.real, -25504929379604.776769, tol=PTOL)
  1566. assert ae(v.imag, -1429035198630576.3879, tol=PTOL)
  1567. v = fp.ei((50.0 - 200.0j))
  1568. assert ae(v, (-18437746526988116954.0 + 17146362239046152342.0j), tol=ATOL)
  1569. assert ae(v.real, -18437746526988116954.0, tol=PTOL)
  1570. assert ae(v.imag, 17146362239046152342.0, tol=PTOL)
  1571. v = fp.ei((80.0 - 320.0j))
  1572. assert ae(v, (-3.3464697299634526706e+31 + 1.6473152633843023919e+32j), tol=ATOL)
  1573. assert ae(v.real, -3.3464697299634526706e+31, tol=PTOL)
  1574. assert ae(v.imag, 1.6473152633843023919e+32, tol=PTOL)
  1575. v = fp.ei((1.1641532182693481445e-10 - 1.1641532182693481445e-10j))
  1576. assert ae(v, (-21.950067703180274374 - 0.78539816351386363145j), tol=ATOL)
  1577. assert ae(v.real, -21.950067703180274374, tol=PTOL)
  1578. assert ae(v.imag, -0.78539816351386363145, tol=PTOL)
  1579. v = fp.ei((0.25 - 0.25j))
  1580. assert ae(v, (-0.21441047326710323254 - 1.0683772981589995996j), tol=ATOL)
  1581. assert ae(v.real, -0.21441047326710323254, tol=PTOL)
  1582. assert ae(v.imag, -1.0683772981589995996, tol=PTOL)
  1583. v = fp.ei((1.0 - 1.0j))
  1584. assert ae(v, (1.7646259855638540684 - 2.3877698515105224193j), tol=ATOL)
  1585. assert ae(v.real, 1.7646259855638540684, tol=PTOL)
  1586. assert ae(v.imag, -2.3877698515105224193, tol=PTOL)
  1587. v = fp.ei((2.0 - 2.0j))
  1588. assert ae(v, (1.8920781621855474089 - 5.3169624378326579621j), tol=ATOL)
  1589. assert ae(v.real, 1.8920781621855474089, tol=PTOL)
  1590. assert ae(v.imag, -5.3169624378326579621, tol=PTOL)
  1591. v = fp.ei((5.0 - 5.0j))
  1592. assert ae(v, (-13.470936071475245856 + 15.322492395731230968j), tol=ATOL)
  1593. assert ae(v.real, -13.470936071475245856, tol=PTOL)
  1594. assert ae(v.imag, 15.322492395731230968, tol=PTOL)
  1595. v = fp.ei((20.0 - 20.0j))
  1596. assert ae(v, (16589317.398788971896 - 5831705.4712368307104j), tol=ATOL)
  1597. assert ae(v.real, 16589317.398788971896, tol=PTOL)
  1598. assert ae(v.imag, -5831705.4712368307104, tol=PTOL)
  1599. v = fp.ei((30.0 - 30.0j))
  1600. assert ae(v, (-154596484273.69322527 + 204179357834.2723043j), tol=ATOL)
  1601. assert ae(v.real, -154596484273.69322527, tol=PTOL)
  1602. assert ae(v.imag, 204179357834.2723043, tol=PTOL)
  1603. v = fp.ei((40.0 - 40.0j))
  1604. assert ae(v, (287512180321448.45408 - 4203502407932318.1156j), tol=ATOL)
  1605. assert ae(v.real, 287512180321448.45408, tol=PTOL)
  1606. assert ae(v.imag, -4203502407932318.1156, tol=PTOL)
  1607. v = fp.ei((50.0 - 50.0j))
  1608. assert ae(v, (36128528616649268826.0 + 64648801861338741960.0j), tol=ATOL)
  1609. assert ae(v.real, 36128528616649268826.0, tol=PTOL)
  1610. assert ae(v.imag, 64648801861338741960.0, tol=PTOL)
  1611. v = fp.ei((80.0 - 80.0j))
  1612. assert ae(v, (-3.8674816337930010217e+32 + 3.0540709639658071041e+32j), tol=ATOL)
  1613. assert ae(v.real, -3.8674816337930010217e+32, tol=PTOL)
  1614. assert ae(v.imag, 3.0540709639658071041e+32, tol=PTOL)
  1615. v = fp.ei((4.6566128730773925781e-10 - 1.1641532182693481445e-10j))
  1616. assert ae(v, (-20.880034621082893023 - 0.24497866324327947603j), tol=ATOL)
  1617. assert ae(v.real, -20.880034621082893023, tol=PTOL)
  1618. assert ae(v.imag, -0.24497866324327947603, tol=PTOL)
  1619. v = fp.ei((1.0 - 0.25j))
  1620. assert ae(v, (1.8942716983721074932 - 0.67268237088273915854j), tol=ATOL)
  1621. assert ae(v.real, 1.8942716983721074932, tol=PTOL)
  1622. assert ae(v.imag, -0.67268237088273915854, tol=PTOL)
  1623. v = fp.ei((4.0 - 1.0j))
  1624. assert ae(v, (14.806699492675420438 - 12.280015176673582616j), tol=ATOL)
  1625. assert ae(v.real, 14.806699492675420438, tol=PTOL)
  1626. assert ae(v.imag, -12.280015176673582616, tol=PTOL)
  1627. v = fp.ei((8.0 - 2.0j))
  1628. assert ae(v, (-54.633252667426386294 - 416.34477429173650012j), tol=ATOL)
  1629. assert ae(v.real, -54.633252667426386294, tol=PTOL)
  1630. assert ae(v.imag, -416.34477429173650012, tol=PTOL)
  1631. v = fp.ei((20.0 - 5.0j))
  1632. assert ae(v, (711836.97165402624643 + 24745247.798103247366j), tol=ATOL)
  1633. assert ae(v.real, 711836.97165402624643, tol=PTOL)
  1634. assert ae(v.imag, 24745247.798103247366, tol=PTOL)
  1635. v = fp.ei((80.0 - 20.0j))
  1636. assert ae(v, (4.2139911108612653091e+32 - 5.3367124741918251637e+32j), tol=ATOL)
  1637. assert ae(v.real, 4.2139911108612653091e+32, tol=PTOL)
  1638. assert ae(v.imag, -5.3367124741918251637e+32, tol=PTOL)
  1639. v = fp.ei((120.0 - 30.0j))
  1640. assert ae(v, (-9.7760616203707508892e+48 + 1.058257682317195792e+50j), tol=ATOL)
  1641. assert ae(v.real, -9.7760616203707508892e+48, tol=PTOL)
  1642. assert ae(v.imag, 1.058257682317195792e+50, tol=PTOL)
  1643. v = fp.ei((160.0 - 40.0j))
  1644. assert ae(v, (-8.7065541466623638861e+66 - 1.6577106725141739889e+67j), tol=ATOL)
  1645. assert ae(v.real, -8.7065541466623638861e+66, tol=PTOL)
  1646. assert ae(v.imag, -1.6577106725141739889e+67, tol=PTOL)
  1647. v = fp.ei((200.0 - 50.0j))
  1648. assert ae(v, (3.070744996327018106e+84 + 1.7243244846769415903e+84j), tol=ATOL)
  1649. assert ae(v.real, 3.070744996327018106e+84, tol=PTOL)
  1650. assert ae(v.imag, 1.7243244846769415903e+84, tol=PTOL)
  1651. v = fp.ei((320.0 - 80.0j))
  1652. assert ae(v, (-9.9960598637998647276e+135 + 2.6855081527595608863e+136j), tol=ATOL)
  1653. assert ae(v.real, -9.9960598637998647276e+135, tol=PTOL)
  1654. assert ae(v.imag, 2.6855081527595608863e+136, tol=PTOL)