Jakub Jelinek wrote: > At this point this seems like something that shouldn't be done inline > anymore, so either we don't do this optimization at all, because the errors > are far bigger than what is acceptable even for -ffast-math, or we have a > library function that does the sinh (tanh (x)) and cosh (tanh (x)) > computations somewhere (libm, libgcc, ...) that handles all the cornercases.
The FMA version should not have any accuracy issues. Without FMA it's harder, but it's not that different from the sin(atan(x)) simplification which also requires two separate cases. So it's more a question how much effort we want to spend optimizing for targets which do not support FMA. Wilco