compiler.tree.propagation: fix unary-op type functions with complex number inputs
parent
9382c67437
commit
172219e931
|
@ -81,7 +81,10 @@ IN: compiler.tree.propagation.known-words
|
|||
class>> dup null-class? [ drop null ] [ math-closure ] if ;
|
||||
|
||||
: unary-op-interval ( info quot -- newinterval )
|
||||
[ interval>> ] dip call ; inline
|
||||
[
|
||||
dup class>> real classes-intersect?
|
||||
[ interval>> ] [ drop full-interval ] if
|
||||
] dip call ; inline
|
||||
|
||||
: unary-op ( word interval-quot post-proc-quot -- )
|
||||
'[
|
||||
|
|
|
@ -186,6 +186,10 @@ IN: compiler.tree.propagation.tests
|
|||
|
||||
[ t ] [ [ { complex } declare absq ] final-info first interval>> [0,inf] = ] unit-test
|
||||
|
||||
[ t ] [ [ { float float } declare rect> C{ 0.0 0.0 } + absq ] final-info first interval>> [0,inf] = ] unit-test
|
||||
|
||||
[ V{ float } ] [ [ { float float } declare rect> C{ 0.0 0.0 } + absq ] final-classes ] unit-test
|
||||
|
||||
[ t ] [ [ [ - absq ] [ + ] 2map-reduce ] final-info first interval>> [0,inf] = ] unit-test
|
||||
|
||||
[ t ] [ [ { double-array double-array } declare [ - absq ] [ + ] 2map-reduce ] final-info first interval>> [0,inf] = ] unit-test
|
||||
|
|
Loading…
Reference in New Issue