Skip to content

Commit

Permalink
[t] Add macro complex_pow_todo
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandobrito committed Dec 15, 2010
1 parent 656190b commit f4691f3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions t/pmc/complex.t
Expand Up @@ -835,6 +835,25 @@ handler:
todo( $I0, $S4 )
.endm

.macro complex_pow_todo( val, res, pow, todo )
$P1 = new ['Complex']
$P2 = new ['Complex']
set $P1, .val

set $S0, .val
set $S1, .res
set $S2, .pow

$P2 = $P1. 'pow'($S2)
$S3 = sprintf "%f%+fi", $P2

concat $S4, $S0, " ^ "
concat $S4, $S4, $S2

$I0 = iseq $S1, $S3
todo( $I0, $S4 )
.endm

.sub ln_of_complex_numbers
.complex_op_is("-2+0i", "0.693147+3.141593i", 'ln' )
.complex_op_is("-1+0i", "0.000000+3.141593i", 'ln' )
Expand Down

0 comments on commit f4691f3

Please sign in to comment.