On Mon, Jan 15, 2024 at 09:20:25PM +0800, Qian Yun wrote:
> Thanks for the explanation...
> 
> Now the final puzzle over algebraic number for me is:
> why sqrt(4) gives 2, instead of both roots?

'sqrt' is a function so it must return single value or signal
error.  Leaving 'sqrt(4)' unevaluated would lead to serious
troubles later.  Error or negative value would be unacceptable
to most users.  So, as lesser evil we return 2.

Just an extra remark: In his thesis R. Fateman showed that
returning "posive" value for "positive" arguments (where
positve is extended also to functions, essentially meaning
positive at infinity) leads to consistent choice, in particular
rules about products of roots are satisfied.  Taking negative
roots would violate product rule.  Fateman later was
sceptical of making choices for functions, but for numbers
since we have to make a choice positive is reasonable
choice.

-- 
                              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/ZaU8RpdHreoysZrK%40fricas.org.

Reply via email to