Commit 7cf5bad6 authored by Mart Lubbers's avatar Mart Lubbers

Merge branch 'small_improvement_for_power_of_Integer' into 'master'

small improvement for power of Integer

See merge request !293
parents 8aae8fa9 185e65f1
Pipeline #31822 failed with stage
in 2 minutes and 13 seconds
......@@ -54,13 +54,9 @@ where
= negative_power_error
| size x.integer_a<>0 || x.integer_s < -1 || x.integer_s > 1
= abort "^ (Integer) overflow"
| x.integer_s==1
| x.integer_s== -1 && n.integer_a.[0] bitand 1==0
= one
| x.integer_s== -1
| n.integer_a.[0] bitand 1==0
= one
= ~one
= zero
= x
where
pow :: !Integer !Int -> Integer
pow a b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment