Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created February 17, 2018 16:35
Show Gist options
  • Save Whateverable/4849e77d44dd28d1349b19b27363a574 to your computer and use it in GitHub Desktop.
Save Whateverable/4849e77d44dd28d1349b19b27363a574 to your computer and use it in GitHub Desktop.
committable6
MVM_SPESH_NODELAY=1 MVM_SPESH_BLOCKING=1 HEAD^ chdir ‘sandbox/roast’; run ‘perl6’, ‘S32-num/complex.t’
¦«HEAD^»:
1..553
ok 1 - Complex.new() gives 0+0i
ok 2 - postfix:<i> creates a Complex number
ok 3 - i creates a Complex number
ok 4 - i == 1i
ok 5 - != and complex numbers
ok 6 - ($n)i form creates a Complex number
ok 7 - $n\i form creates a Complex number
ok 8 - postfix:<i> works on an imaginary number
ok 9 - postfix:<i> works on a Complex number
1..2
ok 1 - '(2 + 3i) > (2 + 2i)' died
ok 2 - right exception type (Exception)
ok 10 - > comparison of complex numbers dies
1..2
ok 1 - '(1 + 2i) < (2 + 4i)' died
ok 2 - right exception type (Exception)
ok 11 - Cannot arithmetically compare Complex numbers
ok 12 - standalone i works to generate a Complex number
ok 13 - standalone i works to generate a Complex number
ok 14 - standalone i works times a Complex number
ok 15 - Complex division
ok 16 - Complex multiplication
ok 17 - dividing Complex by a Real
ok 18 - dividing a Real by a Complex
ok 19 - Real * Complex
ok 20 - Complex * Real
ok 21 - EVAL (1+3i).perl is Complex
ok 22 - EVAL (1+3i).perl is 1+3i
ok 23 - EVAL (1+0i).perl is Complex
ok 24 - EVAL (1+0i).perl is 1
ok 25 - EVAL (3i).perl is Complex
ok 26 - EVAL (3i).perl is 3i
ok 27 - (1+0i).Real is a Real
ok 28 - (1+0i).Real is 1
ok 29 - (1.2+0i).Int is an Int
ok 30 - (1.2+0i).Int is 1
ok 31 - (1.2.sin+0i).Rat is an Rat
ok 32 - (1.2.sin+0i).Rat is 1.2.sin
ok 33 - (1.2+0i).Num is an Num
ok 34 - (1.2+0i).Num is 1.2
ok 35 - (1.2+1i).Complex is an Complex
ok 36 - (1.2+1i).Complex is 1.2+1i
ok 37 - 0+0i + 0 = 0+0i
ok 38 - 0 + 0+0i = 0+0i
ok 39 - 0+0i + 0.0.Num = 0+0i
ok 40 - 0.0.Num + 0+0i = 0+0i
ok 41 - 0+0i + 0/1 = 0+0i
ok 42 - 0/1 + 0+0i = 0+0i
ok 43 - 0+0i - 0 = 0+0i
ok 44 - 0 - 0+0i = -0+0i
ok 45 - 0+0i - 0.0.Num = 0+0i
ok 46 - 0.0.Num - 0+0i = -0+0i
ok 47 - 0+0i - 0/1 = 0+0i
ok 48 - 0/1 - 0+0i = -0+0i
ok 49 - 0+0i + 2
ok 50 - 2 + 0+0i
ok 51 - 0+0i + 2.5.Num = 0+0i
ok 52 - 2.5.Num + 0+0i = 0+0i
ok 53 - 0+0i + 3/2
ok 54 - 3/2 + 0+0i
ok 55 - 0+0i - 2
ok 56 - 2 - 0+0i
ok 57 - 0+0i - 2.5.Num = 0+0i
ok 58 - 2.5.Num - 0+0i = 0+0i
ok 59 - 0+0i - 3/2
ok 60 - 3/2 - 0+0i
ok 61 - 1+0i + 0 = 1+0i
ok 62 - 0 + 1+0i = 1+0i
ok 63 - 1+0i + 0.0.Num = 1+0i
ok 64 - 0.0.Num + 1+0i = 1+0i
ok 65 - 1+0i + 0/1 = 1+0i
ok 66 - 0/1 + 1+0i = 1+0i
ok 67 - 1+0i - 0 = 1+0i
ok 68 - 0 - 1+0i = -1+0i
ok 69 - 1+0i - 0.0.Num = 1+0i
ok 70 - 0.0.Num - 1+0i = -1+0i
ok 71 - 1+0i - 0/1 = 1+0i
ok 72 - 0/1 - 1+0i = -1+0i
ok 73 - 1+0i + 2
ok 74 - 2 + 1+0i
ok 75 - 1+0i + 2.5.Num = 1+0i
ok 76 - 2.5.Num + 1+0i = 1+0i
ok 77 - 1+0i + 3/2
ok 78 - 3/2 + 1+0i
ok 79 - 1+0i - 2
ok 80 - 2 - 1+0i
ok 81 - 1+0i - 2.5.Num = 1+0i
ok 82 - 2.5.Num - 1+0i = 1+0i
ok 83 - 1+0i - 3/2
ok 84 - 3/2 - 1+0i
ok 85 - -1+0i + 0 = -1+0i
ok 86 - 0 + -1+0i = -1+0i
ok 87 - -1+0i + 0.0.Num = -1+0i
ok 88 - 0.0.Num + -1+0i = -1+0i
ok 89 - -1+0i + 0/1 = -1+0i
ok 90 - 0/1 + -1+0i = -1+0i
ok 91 - -1+0i - 0 = -1+0i
ok 92 - 0 - -1+0i = --1+0i
ok 93 - -1+0i - 0.0.Num = -1+0i
ok 94 - 0.0.Num - -1+0i = --1+0i
ok 95 - -1+0i - 0/1 = -1+0i
ok 96 - 0/1 - -1+0i = --1+0i
ok 97 - -1+0i + 2
ok 98 - 2 + -1+0i
ok 99 - -1+0i + 2.5.Num = -1+0i
ok 100 - 2.5.Num + -1+0i = -1+0i
ok 101 - -1+0i + 3/2
ok 102 - 3/2 + -1+0i
ok 103 - -1+0i - 2
ok 104 - 2 - -1+0i
ok 105 - -1+0i - 2.5.Num = -1+0i
ok 106 - 2.5.Num - -1+0i = -1+0i
ok 107 - -1+0i - 3/2
ok 108 - 3/2 - -1+0i
ok 109 - 0+1i + 0 = 0+1i
ok 110 - 0 + 0+1i = 0+1i
ok 111 - 0+1i + 0.0.Num = 0+1i
ok 112 - 0.0.Num + 0+1i = 0+1i
ok 113 - 0+1i + 0/1 = 0+1i
ok 114 - 0/1 + 0+1i = 0+1i
ok 115 - 0+1i - 0 = 0+1i
ok 116 - 0 - 0+1i = -0+1i
ok 117 - 0+1i - 0.0.Num = 0+1i
ok 118 - 0.0.Num - 0+1i = -0+1i
ok 119 - 0+1i - 0/1 = 0+1i
ok 120 - 0/1 - 0+1i = -0+1i
ok 121 - 0+1i + 2
ok 122 - 2 + 0+1i
ok 123 - 0+1i + 2.5.Num = 0+1i
ok 124 - 2.5.Num + 0+1i = 0+1i
ok 125 - 0+1i + 3/2
ok 126 - 3/2 + 0+1i
ok 127 - 0+1i - 2
ok 128 - 2 - 0+1i
ok 129 - 0+1i - 2.5.Num = 0+1i
ok 130 - 2.5.Num - 0+1i = 0+1i
ok 131 - 0+1i - 3/2
ok 132 - 3/2 - 0+1i
ok 133 - -0-1i + 0 = -0-1i
ok 134 - 0 + -0-1i = -0-1i
ok 135 - -0-1i + 0.0.Num = -0-1i
ok 136 - 0.0.Num + -0-1i = -0-1i
ok 137 - -0-1i + 0/1 = -0-1i
ok 138 - 0/1 + -0-1i = -0-1i
ok 139 - -0-1i - 0 = -0-1i
ok 140 - 0 - -0-1i = --0-1i
ok 141 - -0-1i - 0.0.Num = -0-1i
ok 142 - 0.0.Num - -0-1i = --0-1i
ok 143 - -0-1i - 0/1 = -0-1i
ok 144 - 0/1 - -0-1i = --0-1i
ok 145 - -0-1i + 2
ok 146 - 2 + -0-1i
ok 147 - -0-1i + 2.5.Num = -0-1i
ok 148 - 2.5.Num + -0-1i = -0-1i
ok 149 - -0-1i + 3/2
ok 150 - 3/2 + -0-1i
ok 151 - -0-1i - 2
ok 152 - 2 - -0-1i
ok 153 - -0-1i - 2.5.Num = -0-1i
ok 154 - 2.5.Num - -0-1i = -0-1i
ok 155 - -0-1i - 3/2
ok 156 - 3/2 - -0-1i
ok 157 - 2+0i + 0 = 2+0i
ok 158 - 0 + 2+0i = 2+0i
ok 159 - 2+0i + 0.0.Num = 2+0i
ok 160 - 0.0.Num + 2+0i = 2+0i
ok 161 - 2+0i + 0/1 = 2+0i
ok 162 - 0/1 + 2+0i = 2+0i
ok 163 - 2+0i - 0 = 2+0i
ok 164 - 0 - 2+0i = -2+0i
ok 165 - 2+0i - 0.0.Num = 2+0i
ok 166 - 0.0.Num - 2+0i = -2+0i
ok 167 - 2+0i - 0/1 = 2+0i
ok 168 - 0/1 - 2+0i = -2+0i
ok 169 - 2+0i + 2
ok 170 - 2 + 2+0i
ok 171 - 2+0i + 2.5.Num = 2+0i
ok 172 - 2.5.Num + 2+0i = 2+0i
ok 173 - 2+0i + 3/2
ok 174 - 3/2 + 2+0i
ok 175 - 2+0i - 2
ok 176 - 2 - 2+0i
ok 177 - 2+0i - 2.5.Num = 2+0i
ok 178 - 2.5.Num - 2+0i = 2+0i
ok 179 - 2+0i - 3/2
ok 180 - 3/2 - 2+0i
ok 181 - -2+0i + 0 = -2+0i
ok 182 - 0 + -2+0i = -2+0i
ok 183 - -2+0i + 0.0.Num = -2+0i
ok 184 - 0.0.Num + -2+0i = -2+0i
ok 185 - -2+0i + 0/1 = -2+0i
ok 186 - 0/1 + -2+0i = -2+0i
ok 187 - -2+0i - 0 = -2+0i
ok 188 - 0 - -2+0i = --2+0i
ok 189 - -2+0i - 0.0.Num = -2+0i
ok 190 - 0.0.Num - -2+0i = --2+0i
ok 191 - -2+0i - 0/1 = -2+0i
ok 192 - 0/1 - -2+0i = --2+0i
ok 193 - -2+0i + 2
ok 194 - 2 + -2+0i
ok 195 - -2+0i + 2.5.Num = -2+0i
ok 196 - 2.5.Num + -2+0i = -2+0i
ok 197 - -2+0i + 3/2
ok 198 - 3/2 + -2+0i
ok 199 - -2+0i - 2
ok 200 - 2 - -2+0i
ok 201 - -2+0i - 2.5.Num = -2+0i
ok 202 - 2.5.Num - -2+0i = -2+0i
ok 203 - -2+0i - 3/2
ok 204 - 3/2 - -2+0i
ok 205 - 0+2i + 0 = 0+2i
ok 206 - 0 + 0+2i = 0+2i
ok 207 - 0+2i + 0.0.Num = 0+2i
ok 208 - 0.0.Num + 0+2i = 0+2i
ok 209 - 0+2i + 0/1 = 0+2i
ok 210 - 0/1 + 0+2i = 0+2i
ok 211 - 0+2i - 0 = 0+2i
ok 212 - 0 - 0+2i = -0+2i
ok 213 - 0+2i - 0.0.Num = 0+2i
ok 214 - 0.0.Num - 0+2i = -0+2i
ok 215 - 0+2i - 0/1 = 0+2i
ok 216 - 0/1 - 0+2i = -0+2i
ok 217 - 0+2i + 2
ok 218 - 2 + 0+2i
ok 219 - 0+2i + 2.5.Num = 0+2i
ok 220 - 2.5.Num + 0+2i = 0+2i
ok 221 - 0+2i + 3/2
ok 222 - 3/2 + 0+2i
ok 223 - 0+2i - 2
ok 224 - 2 - 0+2i
ok 225 - 0+2i - 2.5.Num = 0+2i
ok 226 - 2.5.Num - 0+2i = 0+2i
ok 227 - 0+2i - 3/2
ok 228 - 3/2 - 0+2i
ok 229 - -0-2i + 0 = -0-2i
ok 230 - 0 + -0-2i = -0-2i
ok 231 - -0-2i + 0.0.Num = -0-2i
ok 232 - 0.0.Num + -0-2i = -0-2i
ok 233 - -0-2i + 0/1 = -0-2i
ok 234 - 0/1 + -0-2i = -0-2i
ok 235 - -0-2i - 0 = -0-2i
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Cannot convert 2+4i to Real: imaginary part not zero
in block <unit> at EVAL_1 line 1
in block at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 623
in sub subtest at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 414
in sub throws-like at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 615
in block <unit> at S32-num/complex.t line 24
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Cannot convert 2+4i to Real: imaginary part not zero
in block at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 623
in sub subtest at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 414
in sub throws-like at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 615
in block <unit> at S32-num/complex.t line 24
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Cannot convert 2+2i to Real: imaginary part not zero
in block <unit> at EVAL_0 line 1
in block at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 623
in sub subtest at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 414
in sub throws-like at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 615
in block <unit> at S32-num/complex.t line 23
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Cannot convert 2+2i to Real: imaginary part not zero
in block at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 623
in sub subtest at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 414
in sub throws-like at /tmp/whateverable/rakudo-moar/31ab86838c3181307ce27caa9ab58476caf441e7/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 615
in block <unit> at S32-num/complex.t line 23
ok 236 - 0 - -0-2i = --0-2i
ok 237 - -0-2i - 0.0.Num = -0-2i
ok 238 - 0.0.Num - -0-2i = --0-2i
ok 239 - -0-2i - 0/1 = -0-2i
ok 240 - 0/1 - -0-2i = --0-2i
ok 241 - -0-2i + 2
ok 242 - 2 + -0-2i
ok 243 - -0-2i + 2.5.Num = -0-2i
ok 244 - 2.5.Num + -0-2i = -0-2i
ok 245 - -0-2i + 3/2
ok 246 - 3/2 + -0-2i
ok 247 - -0-2i - 2
ok 248 - 2 - -0-2i
ok 249 - -0-2i - 2.5.Num = -0-2i
ok 250 - 2.5.Num - -0-2i = -0-2i
ok 251 - -0-2i - 3/2
ok 252 - 3/2 - -0-2i
ok 253 - 2+3i + 0 = 2+3i
ok 254 - 0 + 2+3i = 2+3i
ok 255 - 2+3i + 0.0.Num = 2+3i
ok 256 - 0.0.Num + 2+3i = 2+3i
ok 257 - 2+3i + 0/1 = 2+3i
ok 258 - 0/1 + 2+3i = 2+3i
ok 259 - 2+3i - 0 = 2+3i
ok 260 - 0 - 2+3i = -2+3i
ok 261 - 2+3i - 0.0.Num = 2+3i
ok 262 - 0.0.Num - 2+3i = -2+3i
ok 263 - 2+3i - 0/1 = 2+3i
ok 264 - 0/1 - 2+3i = -2+3i
ok 265 - 2+3i + 2
ok 266 - 2 + 2+3i
ok 267 - 2+3i + 2.5.Num = 2+3i
ok 268 - 2.5.Num + 2+3i = 2+3i
ok 269 - 2+3i + 3/2
ok 270 - 3/2 + 2+3i
ok 271 - 2+3i - 2
ok 272 - 2 - 2+3i
ok 273 - 2+3i - 2.5.Num = 2+3i
ok 274 - 2.5.Num - 2+3i = 2+3i
ok 275 - 2+3i - 3/2
ok 276 - 3/2 - 2+3i
ok 277 - 2-3i + 0 = 2-3i
ok 278 - 0 + 2-3i = 2-3i
ok 279 - 2-3i + 0.0.Num = 2-3i
ok 280 - 0.0.Num + 2-3i = 2-3i
ok 281 - 2-3i + 0/1 = 2-3i
ok 282 - 0/1 + 2-3i = 2-3i
ok 283 - 2-3i - 0 = 2-3i
ok 284 - 0 - 2-3i = -2-3i
ok 285 - 2-3i - 0.0.Num = 2-3i
ok 286 - 0.0.Num - 2-3i = -2-3i
ok 287 - 2-3i - 0/1 = 2-3i
ok 288 - 0/1 - 2-3i = -2-3i
ok 289 - 2-3i + 2
ok 290 - 2 + 2-3i
ok 291 - 2-3i + 2.5.Num = 2-3i
ok 292 - 2.5.Num + 2-3i = 2-3i
ok 293 - 2-3i + 3/2
ok 294 - 3/2 + 2-3i
ok 295 - 2-3i - 2
ok 296 - 2 - 2-3i
ok 297 - 2-3i - 2.5.Num = 2-3i
ok 298 - 2.5.Num - 2-3i = 2-3i
ok 299 - 2-3i - 3/2
ok 300 - 3/2 - 2-3i
ok 301 - -2+3i + 0 = -2+3i
ok 302 - 0 + -2+3i = -2+3i
ok 303 - -2+3i + 0.0.Num = -2+3i
ok 304 - 0.0.Num + -2+3i = -2+3i
ok 305 - -2+3i + 0/1 = -2+3i
ok 306 - 0/1 + -2+3i = -2+3i
ok 307 - -2+3i - 0 = -2+3i
ok 308 - 0 - -2+3i = --2+3i
ok 309 - -2+3i - 0.0.Num = -2+3i
ok 310 - 0.0.Num - -2+3i = --2+3i
ok 311 - -2+3i - 0/1 = -2+3i
ok 312 - 0/1 - -2+3i = --2+3i
ok 313 - -2+3i + 2
ok 314 - 2 + -2+3i
ok 315 - -2+3i + 2.5.Num = -2+3i
ok 316 - 2.5.Num + -2+3i = -2+3i
ok 317 - -2+3i + 3/2
ok 318 - 3/2 + -2+3i
ok 319 - -2+3i - 2
ok 320 - 2 - -2+3i
ok 321 - -2+3i - 2.5.Num = -2+3i
ok 322 - 2.5.Num - -2+3i = -2+3i
ok 323 - -2+3i - 3/2
ok 324 - 3/2 - -2+3i
ok 325 - -2-3i + 0 = -2-3i
ok 326 - 0 + -2-3i = -2-3i
ok 327 - -2-3i + 0.0.Num = -2-3i
ok 328 - 0.0.Num + -2-3i = -2-3i
ok 329 - -2-3i + 0/1 = -2-3i
ok 330 - 0/1 + -2-3i = -2-3i
ok 331 - -2-3i - 0 = -2-3i
ok 332 - 0 - -2-3i = --2-3i
ok 333 - -2-3i - 0.0.Num = -2-3i
ok 334 - 0.0.Num - -2-3i = --2-3i
ok 335 - -2-3i - 0/1 = -2-3i
ok 336 - 0/1 - -2-3i = --2-3i
ok 337 - -2-3i + 2
ok 338 - 2 + -2-3i
ok 339 - -2-3i + 2.5.Num = -2-3i
ok 340 - 2.5.Num + -2-3i = -2-3i
ok 341 - -2-3i + 3/2
ok 342 - 3/2 + -2-3i
ok 343 - -2-3i - 2
ok 344 - 2 - -2-3i
ok 345 - -2-3i - 2.5.Num = -2-3i
ok 346 - 2.5.Num - -2-3i = -2-3i
ok 347 - -2-3i - 3/2
ok 348 - 3/2 - -2-3i
ok 349 - 0.453596121425577+0.891207360061435i + 0 = 0.453596121425577+0.891207360061435i
ok 350 - 0 + 0.453596121425577+0.891207360061435i = 0.453596121425577+0.891207360061435i
ok 351 - 0.453596121425577+0.891207360061435i + 0.0.Num = 0.453596121425577+0.891207360061435i
ok 352 - 0.0.Num + 0.453596121425577+0.891207360061435i = 0.453596121425577+0.891207360061435i
ok 353 - 0.453596121425577+0.891207360061435i + 0/1 = 0.453596121425577+0.891207360061435i
ok 354 - 0/1 + 0.453596121425577+0.891207360061435i = 0.453596121425577+0.891207360061435i
ok 355 - 0.453596121425577+0.891207360061435i - 0 = 0.453596121425577+0.891207360061435i
ok 356 - 0 - 0.453596121425577+0.891207360061435i = -0.453596121425577+0.891207360061435i
ok 357 - 0.453596121425577+0.891207360061435i - 0.0.Num = 0.453596121425577+0.891207360061435i
ok 358 - 0.0.Num - 0.453596121425577+0.891207360061435i = -0.453596121425577+0.891207360061435i
ok 359 - 0.453596121425577+0.891207360061435i - 0/1 = 0.453596121425577+0.891207360061435i
ok 360 - 0/1 - 0.453596121425577+0.891207360061435i = -0.453596121425577+0.891207360061435i
ok 361 - 0.453596121425577+0.891207360061435i + 2
ok 362 - 2 + 0.453596121425577+0.891207360061435i
ok 363 - 0.453596121425577+0.891207360061435i + 2.5.Num = 0.453596121425577+0.891207360061435i
ok 364 - 2.5.Num + 0.453596121425577+0.891207360061435i = 0.453596121425577+0.891207360061435i
ok 365 - 0.453596121425577+0.891207360061435i + 3/2
ok 366 - 3/2 + 0.453596121425577+0.891207360061435i
ok 367 - 0.453596121425577+0.891207360061435i - 2
ok 368 - 2 - 0.453596121425577+0.891207360061435i
ok 369 - 0.453596121425577+0.891207360061435i - 2.5.Num = 0.453596121425577+0.891207360061435i
ok 370 - 2.5.Num - 0.453596121425577+0.891207360061435i = 0.453596121425577+0.891207360061435i
ok 371 - 0.453596121425577+0.891207360061435i - 3/2
ok 372 - 3/2 - 0.453596121425577+0.891207360061435i
ok 373 - -0.999135150273279+0.0415806624332905i + 0 = -0.999135150273279+0.0415806624332905i
ok 374 - 0 + -0.999135150273279+0.0415806624332905i = -0.999135150273279+0.0415806624332905i
ok 375 - -0.999135150273279+0.0415806624332905i + 0.0.Num = -0.999135150273279+0.0415806624332905i
ok 376 - 0.0.Num + -0.999135150273279+0.0415806624332905i = -0.999135150273279+0.0415806624332905i
ok 377 - -0.999135150273279+0.0415806624332905i + 0/1 = -0.999135150273279+0.0415806624332905i
ok 378 - 0/1 + -0.999135150273279+0.0415806624332905i = -0.999135150273279+0.0415806624332905i
ok 379 - -0.999135150273279+0.0415806624332905i - 0 = -0.999135150273279+0.0415806624332905i
ok 380 - 0 - -0.999135150273279+0.0415806624332905i = --0.999135150273279+0.0415806624332905i
ok 381 - -0.999135150273279+0.0415806624332905i - 0.0.Num = -0.999135150273279+0.0415806624332905i
ok 382 - 0.0.Num - -0.999135150273279+0.0415806624332905i = --0.999135150273279+0.0415806624332905i
ok 383 - -0.999135150273279+0.0415806624332905i - 0/1 = -0.999135150273279+0.0415806624332905i
ok 384 - 0/1 - -0.999135150273279+0.0415806624332905i = --0.999135150273279+0.0415806624332905i
ok 385 - -0.999135150273279+0.0415806624332905i + 2
ok 386 - 2 + -0.999135150273279+0.0415806624332905i
ok 387 - -0.999135150273279+0.0415806624332905i + 2.5.Num = -0.999135150273279+0.0415806624332905i
ok 388 - 2.5.Num + -0.999135150273279+0.0415806624332905i = -0.999135150273279+0.0415806624332905i
ok 389 - -0.999135150273279+0.0415806624332905i + 3/2
ok 390 - 3/2 + -0.999135150273279+0.0415806624332905i
ok 391 - -0.999135150273279+0.0415806624332905i - 2
ok 392 - 2 - -0.999135150273279+0.0415806624332905i
ok 393 - -0.999135150273279+0.0415806624332905i - 2.5.Num = -0.999135150273279+0.0415806624332905i
ok 394 - 2.5.Num - -0.999135150273279+0.0415806624332905i = -0.999135150273279+0.0415806624332905i
ok 395 - -0.999135150273279+0.0415806624332905i - 3/2
ok 396 - 3/2 - -0.999135150273279+0.0415806624332905i
ok 397 - 0.37797774271298-0.925814682327732i + 0 = 0.37797774271298-0.925814682327732i
ok 398 - 0 + 0.37797774271298-0.925814682327732i = 0.37797774271298-0.925814682327732i
ok 399 - 0.37797774271298-0.925814682327732i + 0.0.Num = 0.37797774271298-0.925814682327732i
ok 400 - 0.0.Num + 0.37797774271298-0.925814682327732i = 0.37797774271298-0.925814682327732i
ok 401 - 0.37797774271298-0.925814682327732i + 0/1 = 0.37797774271298-0.925814682327732i
ok 402 - 0/1 + 0.37797774271298-0.925814682327732i = 0.37797774271298-0.925814682327732i
ok 403 - 0.37797774271298-0.925814682327732i - 0 = 0.37797774271298-0.925814682327732i
ok 404 - 0 - 0.37797774271298-0.925814682327732i = -0.37797774271298-0.925814682327732i
ok 405 - 0.37797774271298-0.925814682327732i - 0.0.Num = 0.37797774271298-0.925814682327732i
ok 406 - 0.0.Num - 0.37797774271298-0.925814682327732i = -0.37797774271298-0.925814682327732i
ok 407 - 0.37797774271298-0.925814682327732i - 0/1 = 0.37797774271298-0.925814682327732i
ok 408 - 0/1 - 0.37797774271298-0.925814682327732i = -0.37797774271298-0.925814682327732i
ok 409 - 0.37797774271298-0.925814682327732i + 2
ok 410 - 2 + 0.37797774271298-0.925814682327732i
ok 411 - 0.37797774271298-0.925814682327732i + 2.5.Num = 0.37797774271298-0.925814682327732i
ok 412 - 2.5.Num + 0.37797774271298-0.925814682327732i = 0.37797774271298-0.925814682327732i
ok 413 - 0.37797774271298-0.925814682327732i + 3/2
ok 414 - 3/2 + 0.37797774271298-0.925814682327732i
ok 415 - 0.37797774271298-0.925814682327732i - 2
ok 416 - 2 - 0.37797774271298-0.925814682327732i
ok 417 - 0.37797774271298-0.925814682327732i - 2.5.Num = 0.37797774271298-0.925814682327732i
ok 418 - 2.5.Num - 0.37797774271298-0.925814682327732i = 0.37797774271298-0.925814682327732i
ok 419 - 0.37797774271298-0.925814682327732i - 3/2
ok 420 - 3/2 - 0.37797774271298-0.925814682327732i
ok 421 - 24.3847348271508+25.1074631814833i + 0 = 24.3847348271508+25.1074631814833i
ok 422 - 0 + 24.3847348271508+25.1074631814833i = 24.3847348271508+25.1074631814833i
ok 423 - 24.3847348271508+25.1074631814833i + 0.0.Num = 24.3847348271508+25.1074631814833i
ok 424 - 0.0.Num + 24.3847348271508+25.1074631814833i = 24.3847348271508+25.1074631814833i
ok 425 - 24.3847348271508+25.1074631814833i + 0/1 = 24.3847348271508+25.1074631814833i
ok 426 - 0/1 + 24.3847348271508+25.1074631814833i = 24.3847348271508+25.1074631814833i
ok 427 - 24.3847348271508+25.1074631814833i - 0 = 24.3847348271508+25.1074631814833i
ok 428 - 0 - 24.3847348271508+25.1074631814833i = -24.3847348271508+25.1074631814833i
ok 429 - 24.3847348271508+25.1074631814833i - 0.0.Num = 24.3847348271508+25.1074631814833i
ok 430 - 0.0.Num - 24.3847348271508+25.1074631814833i = -24.3847348271508+25.1074631814833i
ok 431 - 24.3847348271508+25.1074631814833i - 0/1 = 24.3847348271508+25.1074631814833i
ok 432 - 0/1 - 24.3847348271508+25.1074631814833i = -24.3847348271508+25.1074631814833i
ok 433 - 24.3847348271508+25.1074631814833i + 2
ok 434 - 2 + 24.3847348271508+25.1074631814833i
ok 435 - 24.3847348271508+25.1074631814833i + 2.5.Num = 24.3847348271508+25.1074631814833i
ok 436 - 2.5.Num + 24.3847348271508+25.1074631814833i = 24.3847348271508+25.1074631814833i
ok 437 - 24.3847348271508+25.1074631814833i + 3/2
ok 438 - 3/2 + 24.3847348271508+25.1074631814833i
ok 439 - 24.3847348271508+25.1074631814833i - 2
ok 440 - 2 - 24.3847348271508+25.1074631814833i
ok 441 - 24.3847348271508+25.1074631814833i - 2.5.Num = 24.3847348271508+25.1074631814833i
ok 442 - 2.5.Num - 24.3847348271508+25.1074631814833i = 24.3847348271508+25.1074631814833i
ok 443 - 24.3847348271508+25.1074631814833i - 3/2
ok 444 - 3/2 - 24.3847348271508+25.1074631814833i
ok 445 - -33.9240012684163-21.1934456363397i + 0 = -33.9240012684163-21.1934456363397i
ok 446 - 0 + -33.9240012684163-21.1934456363397i = -33.9240012684163-21.1934456363397i
ok 447 - -33.9240012684163-21.1934456363397i + 0.0.Num = -33.9240012684163-21.1934456363397i
ok 448 - 0.0.Num + -33.9240012684163-21.1934456363397i = -33.9240012684163-21.1934456363397i
ok 449 - -33.9240012684163-21.1934456363397i + 0/1 = -33.9240012684163-21.1934456363397i
ok 450 - 0/1 + -33.9240012684163-21.1934456363397i = -33.9240012684163-21.1934456363397i
ok 451 - -33.9240012684163-21.1934456363397i - 0 = -33.9240012684163-21.1934456363397i
ok 452 - 0 - -33.9240012684163-21.1934456363397i = --33.9240012684163-21.1934456363397i
ok 453 - -33.9240012684163-21.1934456363397i - 0.0.Num = -33.9240012684163-21.1934456363397i
ok 454 - 0.0.Num - -33.9240012684163-21.1934456363397i = --33.9240012684163-21.1934456363397i
ok 455 - -33.9240012684163-21.1934456363397i - 0/1 = -33.9240012684163-21.1934456363397i
ok 456 - 0/1 - -33.9240012684163-21.1934456363397i = --33.9240012684163-21.1934456363397i
ok 457 - -33.9240012684163-21.1934456363397i + 2
ok 458 - 2 + -33.9240012684163-21.1934456363397i
ok 459 - -33.9240012684163-21.1934456363397i + 2.5.Num = -33.9240012684163-21.1934456363397i
ok 460 - 2.5.Num + -33.9240012684163-21.1934456363397i = -33.9240012684163-21.1934456363397i
ok 461 - -33.9240012684163-21.1934456363397i + 3/2
ok 462 - 3/2 + -33.9240012684163-21.1934456363397i
ok 463 - -33.9240012684163-21.1934456363397i - 2
ok 464 - 2 - -33.9240012684163-21.1934456363397i
ok 465 - -33.9240012684163-21.1934456363397i - 2.5.Num = -33.9240012684163-21.1934456363397i
ok 466 - 2.5.Num - -33.9240012684163-21.1934456363397i = -33.9240012684163-21.1934456363397i
ok 467 - -33.9240012684163-21.1934456363397i - 3/2
ok 468 - 3/2 - -33.9240012684163-21.1934456363397i
ok 469 - Complex.re works
ok 470 - Complex.im works
ok 471 - Complex 0 ** Int works
ok 472 - Complex 0 ** Rat works
ok 473 - Complex 0 ** Complex works
ok 474 - Real 0 ** Complex works
ok 475 - exp(3.0 * log(1i))
ok 476 - same as wrapped as sub
ok 477 - log e base i == -2i / pi
ok 478 - 3i + "1"
ok 479 - "1" + 3i
ok 480 - 3i - "1"
ok 481 - "1" - 3i
ok 482 - 3i * "1"
ok 483 - "1" * 3i
ok 484 - 3i / "1"
ok 485 - "1" / 3i
ok 486 - 3i ** "1"
ok 487 - "1" ** 3i
ok 488 - conj 2+3i -> 2-3i
ok 489 - conj 5-4i -> 5+4i
ok 490 - <2+2i> cmp <2+2i>
ok 491 - <2-2i> cmp <2-2i>
ok 492 - <-2-2i> cmp <-2-2i>
ok 493 - <-2+2i> cmp <-2+2i>
ok 494 - <12+2i> cmp <2+2i>
ok 495 - <-2+2i> cmp <2+2i>
ok 496 - <2-12i> cmp <2-2i>
ok 497 - <12-2i> cmp <2-2i>
ok 498 - <2+12i> cmp <2+2i>
ok 499 - <2-12i> cmp <2-2i>
ok 500 - <2+2i> cmp <12+2i>
ok 501 - <2+2i> cmp <12+2i>
ok 502 - <2+2i> cmp 2
ok 503 - <2-2i> cmp 2
ok 504 - <2+0i> cmp 2
ok 505 - 2 cmp <2-0i>
ok 506 - 1 cmp <2-2i>
ok 507 - 2 cmp <2+0i>
ok 508 - 2 cmp <2-2i>
ok 509 - 2 cmp <2+2i>
ok 510 - <NaN+0i> cmp <0+0i>
ok 511 - <0+NaNi> cmp <0+0i>
ok 512 - Num(Complex) pays attention to $*TOLERANCE
1..2
ok 1 - 'Num(exp i * π)' died
ok 2 - right exception type (Exception)
ok 513 - Num(Complex) pays attention to $*TOLERANCE
ok 514 - .reals
ok 515 - .floor (+r+i)
ok 516 - .floor (-r+i)
ok 517 - .floor (+r-i)
ok 518 - .floor (-r-i)
ok 519 - .ceiling (+r+i)
ok 520 - .ceiling (-r+i)
ok 521 - .ceiling (+r-i)
ok 522 - .ceiling (-r-i)
ok 523 - .round (+r+i), .5r
ok 524 - .round (-r+i), .5r
ok 525 - .round (+r-i), .5r
ok 526 - .round (-r-i), .5r
ok 527 - .round (+r+i), .5i
ok 528 - .round (-r+i), .5i
ok 529 - .round (+r-i), .5i
ok 530 - .round (-r-i), .5i
ok 531 - .round (+r+i), .5r, .5i
ok 532 - .round (-r+i), .5r, .5i
ok 533 - .round (+r-i), .5r, .5i
ok 534 - .round (-r-i), .5r, .5i
ok 535 - .truncate (+r+i), .5r
ok 536 - .truncate (-r+i), .5r
ok 537 - .truncate (+r-i), .5r
ok 538 - .truncate (-r-i), .5r
ok 539 - .truncate (+r+i), .5i
ok 540 - .truncate (-r+i), .5i
ok 541 - .truncate (+r-i), .5i
ok 542 - .truncate (-r-i), .5i
ok 543 - .truncate (+r+i), .5r, .5i
ok 544 - .truncate (-r+i), .5r, .5i
ok 545 - .truncate (+r-i), .5r, .5i
ok 546 - .truncate (-r-i), .5r, .5i
ok 547 - abs(3+4i)
ok 548 - abs(i)
ok 549 - abs(1+i)
1..6
ok 1 - Int, True
ok 2 - Num, True
ok 3 - Rat, True
ok 4 - Int, False
ok 5 - Num, False
ok 6 - Rat, False
ok 550 - Real ≅ Complex
ok 551 - i postfix with custom Numerics works
1..6
ok 1 - Same, zero i part
ok 2 - Less, zero i part
ok 3 - More, zero i part
ok 4 - Same, negligible i part
ok 5 - Less, negligible i part
ok 6 - More, negligible i part
ok 552 - Real <=> Complex
1..3
ok 1 - n**0
ok 2 - n**n
ok 3 - 0**n
ok 553 - exponentiation with zero (n = 0+0i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment