Maybe I don“t understand that code, but shouldn't
even?(denom(n))
actually be
denom(n) > 1
? There is no need for abs(denom(n)) here, since seemingly FRAC(INT)
never returns a negative denominator.
https://github.com/fricas/fricas/blob/master/src/algebra/interval.spad#L493
-- From RadicalCategory
_^(u : %, n : Fraction Integer) : % ==
lo : R := inf(u)
hi : R := sup(u)
lo <= 0 =>
even?(denom(n)) => -- <========= ???
error "fractional power only defined for x > 0"
even?(numer(n)) =>
hi < 0 =>
interval(0, lo^n)
interval(0, max(lo^n, hi^n))
interval(lo^n, hi^n)
interval(lo^n, hi^n)
Ralf
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/fricas-devel/0a7c0e4c-4dc7-4636-890e-91c1bb8267ce%40hemmecke.org.