flat assembler
Message board for the users of flat assembler.
Index
> Main > transcendental functions 
Author 

revolution
Are you aware of fptan?
It doesn't give the full four quadrant result. Some extra processing is required if you need that. 

14 Jan 2022, 00:53 

Hrstka
You can take a look at the SLEEF Vectorized Math Library, if that's what you mean.


14 Jan 2022, 08:51 

Ville
SLEEF is also available in Menuet64 in assembly.
System call 151. http://menuetos.net/syscalls.txt http://www.menuetos.net/sc151.html 

14 Jan 2022, 11:13 

sylware
@revolution: yeah, range reduction. It seems IBM is doing many range reductions in their glibc/libm tan over [0,PI/2[. For trigonometric functions, no worries, but for the natural logarithm I guess I may need to find papers about good range reductions. I try to move away from x87.
@hrstka,@villeBut: menuet64 is "close" source then is their assembly port of SLEEF. I would like to be able to "check" their maths, namely double check the proof of their precision ("ulp" related). Namely for each approx methods: Chebychev(Remez), PadÃ©, raw Taylor, arithmetic/geometric mean, I would need to get my eyes on papers on proof of their precisions ("ulp"). I think it is more maths than assembly, but to see explicitely those maths applied for some code, you know, to understand where it comes from. I recall vaguely in the case of raw Taylor, the "remainder" theorem which allows to do just that. Why such important stuff is so hard to find on internet??? Yep, after furter investigation, before going assembly port/handcompilation of the code of a tan/log approximant, I need to double check their "ulp" mathematical proof. Getting my hands on sleef to see if I can do just that: for the moment, sleef documentation is the less worse I could read, but it still throws a lot at our face. It seems there is no proof, just "good enough"/empirical polynomial coefficients computed via many points over a "reduced" range using the simplex (linear programming) algorithm to minimize the relative error to the output of very high precision numbers from mpfr. It seems to explain why many math libs are doing "their own thing". The elephant in the room is they are doing a huge mistake by being very dependant on the worst part of optimizing compilers. This project should be pure assembly for each targeted arch with at best a generic simple C89 with benign bits of c99/c11 implementation. ofc, I did forget about the numerical stability discussion of their approximant, nowhere to be found... wild guess: this is "common knowledge" in the numerical analysis field. 

14 Jan 2022, 15:21 

< Last Thread  Next Thread > 
Forum Rules:

Copyright © 19992020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.