19 Nov
2004
19 Nov
'04
12:03 a.m.
Isidro CachadiƱa GutiƩrrez wrote:
If you are working with real number, you don't expect complex numbers arriving elsewhere
That's a problem with your mathematical education, not a problem with CLN.
I prefer an error warning if something like sqrt(-1) happen.
You get a compilation error if you write cl_R x, y, z; z = expt(x, y); This makes you aware to check your formulas. You do that, then insert the cast cl_R x, y, z; z = As(cl_R)(expt(x, y)); then CLN checks that the result is indeed a real number. What more do you want? The signature sqrt : cl_R -> cl_R is a convenience function which omits the possibility of a compilation error. Maybe this is a disadvantage. Bruno