|
From: Raymond T. <rt...@us...> - 2025-11-30 20:15:17
|
This should probably be a new issue or a discussion on the mailing list. Like the rest of Maxima, I didn't write any design docs. :-( The only documentation is the code and comments in src/numeric.lisp. However the general idea with the functions in the bigfloat package is to mimic what CL does, except when one (or more) operands are bfloats, in which case the result is a bfloat. Also `bigfloat:to` returns a numeric type. If the arg is a CL type, that's what you get. If it's a bfloat, you get a bigfloat object. By doing it this way, you could write one function that would handle CL numeric types or bfloats without changing the function. Of course, if speed mattered, you'd write a special double-float version. But the bfloat version could very possibly be identical, if some care is taken to compute an epsilon value appropriately. So in your example of `(bigfloat::expt (bigfloat:to 4) (bigfloat:to '((rat) 1 2)))`, the args are a CL fixnum and a CL ratio. By the rules of CL, the result is a single-precision result. (I don't remember exactly where the `to` name came from, but there was a Maxima function `to` that did something similar.) You've probably forgotten that 1e0 and 1f0 are the same precision. I should probably convert some of the comments in to docstrings so you can easily look up what they do via `cl:describe`. --- **[bugs:#4636] signum(ind) is an error** **Status:** open **Group:** None **Labels:** extended real signum limit **Created:** Thu Nov 27, 2025 12:41 PM UTC by Barton Willis **Last Updated:** Sun Nov 30, 2025 02:27 PM UTC **Owner:** nobody Either a `signum` nounform or `ind` is a better result than an error: ~~~ (%i4) signum(ind); sign: sign of ind is undefined. ~~~ Should the general simplifier, or the one‑argument limit function, handle` F(extended-real)`? We’ve discussed this—do we have a consensus? --- Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |