On Tue, Jul 09, 2024 at 06:00:42PM +0200, Ralf Hemmecke wrote:
> Currently, I have a WIP implementation of rootFactor for algebraic numbers
> that builds on DoubleFloat to check whether an algebraic number is real
> and/or positive. With that I restrict the factoring in such a way that the
> value of the algebraic number will not change during that factorization.
>
> Unfortunately, that does of course not work for all cases because of
> possible DoubleFloat overflow. So I would like to use a private copy of
> Float inside that package so that I can change the precision to my liking
> without influencing or being influenced by the setting of the global Float
> domain.
>
> Can I force the compiler to create a private copy of Float? How?
You would have to copy the source. Current approach is just set
precision as needed in pattern like
foo() ==
l := bits();
try
-- set new precision
bits(128)
-- do work
finally
bits(l)
The 'finally' part is executed both in case of normal exit and
in case of error. So using this pattern you will not change
"otside" precision. And you may count of called routines to
respect your precision.
--
Waldek Hebisch
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/Zo1iHwGnA7Xbdi4m%40fricas.org.