[PATCH] fix acsch and asech in EFUPXS

2 views
Skip to first unread message

Qian Yun

unread,
May 8, 2026, 7:19:25 PM (23 hours ago) May 8
to fricas-devel
PULS ==> UnivariateLaurentSeries(Expression(Integer),x,1)
PUPS ==> UnivariatePuiseuxSeries(Expression(Integer),x,1)
PUTS ==> UnivariateTaylorSeries(Expression(Integer),x,1)

P := EFUPXS(EXPR INT, PULS, PUPS, EFULS(EXPR INT, PUTS, PULS))

y := puiseux('x,x=1)

acsch(y)
acsch(y)$P

asech(y)
asech(y)$P



====

I guess the original authors typed "*" instead of "**".
As illustrated above, acsch and asech in EFUPXS does not agree
with UPS, after the patch, they do.

(spotted by LLM)

- Qian

diff --git a/src/algebra/efupxs.spad b/src/algebra/efupxs.spad
index 11d2f7db..0d44b27a 100644
--- a/src/algebra/efupxs.spad
+++ b/src/algebra/efupxs.spad
@@ -212,14 +212,14 @@
TRANSFCN =>
order(upxs,0) < 0 => "failed"
(rec := recip upxs) case "failed" => "failed"
- log((1 + (1 - upxs*upxs)*(1/2)) * (rec@UPXS))
+ log((1 + (1 - upxs*upxs)^(1/2)) * (rec@UPXS))
"failed"

acschIfCan upxs ==
TRANSFCN =>
order(upxs,0) < 0 => "failed"
(rec := recip upxs) case "failed" => "failed"
- log((1 + (1 + upxs*upxs)*(1/2)) * (rec@UPXS))
+ log((1 + (1 + upxs*upxs)^(1/2)) * (rec@UPXS))
"failed"

applyOrError:(UPXS -> Union(UPXS,"failed"),String,UPXS) -> UPXS

Waldek Hebisch

unread,
May 8, 2026, 8:27:32 PM (22 hours ago) May 8
to fricas...@googlegroups.com
On Sat, May 09, 2026 at 07:19:21AM +0800, Qian Yun wrote:
> PULS ==> UnivariateLaurentSeries(Expression(Integer),x,1)
> PUPS ==> UnivariatePuiseuxSeries(Expression(Integer),x,1)
> PUTS ==> UnivariateTaylorSeries(Expression(Integer),x,1)
>
> P := EFUPXS(EXPR INT, PULS, PUPS, EFULS(EXPR INT, PUTS, PULS))
>
> y := puiseux('x,x=1)
>
> acsch(y)
> acsch(y)$P
>
> asech(y)
> asech(y)$P
>
>
>
> ====
>
> I guess the original authors typed "*" instead of "**".
> As illustrated above, acsch and asech in EFUPXS does not agree
> with UPS, after the patch, they do.

Yes, thanks. Please commit.


> (spotted by LLM)
>
> - Qian
>
> diff --git a/src/algebra/efupxs.spad b/src/algebra/efupxs.spad
> index 11d2f7db..0d44b27a 100644
> --- a/src/algebra/efupxs.spad
> +++ b/src/algebra/efupxs.spad
> @@ -212,14 +212,14 @@
> TRANSFCN =>
> order(upxs,0) < 0 => "failed"
> (rec := recip upxs) case "failed" => "failed"
> - log((1 + (1 - upxs*upxs)*(1/2)) * (rec@UPXS))
> + log((1 + (1 - upxs*upxs)^(1/2)) * (rec@UPXS))
> "failed"
>
> acschIfCan upxs ==
> TRANSFCN =>
> order(upxs,0) < 0 => "failed"
> (rec := recip upxs) case "failed" => "failed"
> - log((1 + (1 + upxs*upxs)*(1/2)) * (rec@UPXS))
> + log((1 + (1 + upxs*upxs)^(1/2)) * (rec@UPXS))
> "failed"
>
> applyOrError:(UPXS -> Union(UPXS,"failed"),String,UPXS) -> UPXS
>
> --
> 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...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/f918c023-ccef-4ef5-bd4e-9d979c9cd00e%40gmail.com.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages