[Sollya-users] [Sollya-devl] Fwd: information, features regarding remez and fplll

Sylvain CHEVILLARD sylvain.chevillard at inria.fr
Thu Jun 14 12:06:41 CEST 2018


I am answering your questions sequentially below.

> I have a number of approximations to make, many of which I have 
> explorerd in Mathematica and the results look promising. I now have 
> several variations for which I'd like (semi) optimised floating point 
> coefficients not just arbitrary precision coefficients.
> It seems like sollya should help me find the optimised coefficients, 
> but from my perusal of the online documentation, I dont quite see how.
Yes indeed, Sollya is the perfectly appropriate tool for that.

> I have three features I'd like to use that I cant see in the online 
> documentation for sollya:
> 1) rational polynomial approximations, all the documentation suggests 
> only simple polynomials

Unfortunately, Sollya does not handle yet rational approximation. 
Nevertheless, if you computed a rational approximation to a function 
from another tool, we still can try to manually trick Sollya and its 
fpminimax function to get a good rational approximation with 
floating-point coefficients, by handling separately the numerator and 
denominator. I never did it, though, but I would be glad to help you by 
looking together at an example if you wish.

> 2) simple change-of-variable/transform

What do you mean? If you have to functions f and g given by expressions, 
you can construct the composition f o g of both functions in Sollya by 
doing f(g). This should be enough to perform any change of variable, 
isn't it?
> 3) separate control of precision for different coefficients (Im NOT 
> expecting automatic handling of complexities of variable precision of 
> double-double)
The fpminimax function allows you to look for a polynomial approximation 
with machine-representable coefficients, with each coefficient having 
its own format (they can be floating-point or fixed-point coefficients 
of any precision; the only constraint is that you cannot easily mix 
floating-point *and* fixed-point coefficients in the same polynomial, 
though, again, we could do things by hand in such a situation).

> It may be that all are present, but not directly referred to in the 
> documentation.
> I think a simple change of variable may be implemented by a list of 
> terms like [| 1, h(x), h(x)^2, ... , h(x)^n |] but this will get 
> tedious and messy with rational polynomials, and I'm not sure if the 
> implementation caches the evaluation of h(x) in this scenario.

This is indeed the way of doing it. You are right, we start reaching the 
limit of Sollya's design here. We welcome any constructive remark or 
feature request.
About caching the evaluation of h(x), there is nothing like that, but 
again, if this is an issue, we could think of more or less dirty solutions.

> It may be that the best solution is not use remez in Sollya, but to 
> import predetermined high precision coefficients and then use sollya 
> (and indirectly fplll) to find (near) optimal floating point 
> coefficients. But I also don't see documentation for this.

As I said above, if you want to deal with rational approximations, this 
is definitely the way to do.

> Or am I misinterpreting what sollya is intended to solve ?

No, no, you seem to perfectly interpret the purpose of Sollya. You might 
simply overestimate a little bit its abilities :-)
But again, I would be glad to help you handle one of your examples to 
see if we can trick it (or improve Sollya by adding a new feature).

Sylvain Chevillard

More information about the Sollya-users mailing list