#17179: TIDES interface should convert exact parameters to floating points.
-------------------------------------+-------------------------------------
Reporter: mmarco | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: Miguel Marco | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/mmarco/ticket/17179 | 5e6443ef83da23f5d5c911554b2e70ea0bc01bb3
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:6 mmarco]:
> `RR(SR(foo))` is used because strings like `"pi"` or `"-3/2"` are not
accepted by the element constructor of real fields.
I would say that's a good thing! Why ''should'' strings like that be
accepted as input? I think it's reasonable to accept the elements `pi`
(element of `SR`) and `3/2` (element of `QQ`) but not the strings `"pi"`
or `"-3/2"`.
> The real value of log(10)/log(2) is between 3.3219 and 3.322, so i
prefeared to be conservative in this aspect.
If your precision doesn't agree with `TIDES_PREC`, the result might
actually be ''less precise'': mpfr guarantees that the string
representation (with `truncate=False` in Sage) is such that the exact same
real number will be created by `mpfr_set_str(string, MPFR_RNDN)`
''provided that the precision is the same''.
I understand that you prefer to round `log(10)/log(2)` up, but then
`TIDES_PREC` should agree with this:
{{{
prec = ceil(dig * 3.322)
RR = RealField(prec)
...
outfile.write('\tTIDES_PREC = {};'.format(prec)) # instead of
set_precision_digits()
}}}
> This commit addresses mostly all your comments, but i think that the
code could be greatly improved if we pass the domain to fast_callable,
which would directly convert all constants, avoiding us the work of
converting the exact expressions to the strings that represent them in
floating point.
I have no experience with `fast_callable`, so I cannot judge.
> Besides, there is also some room for improvement in the performance of
`remove_repeated` .
>
> I will work on that, but i am not sure if it should be done in this
ticket
Not on this ticket.
--
Ticket URL: <http://trac.sagemath.org/ticket/17179#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.