\mathsf{max}\left(\tanh x, 0.0\right)\mathsf{max}\left(\tanh x, 0.0\right)double code(double x) {
return ((double) fmax(((double) tanh(x)), 0.0));
}
double code(double x) {
return ((double) fmax(((double) tanh(x)), 0.0));
}



Bits error versus x
Results
Initial program 0.0
Final simplification0.0
herbie shell --seed 2020153
(FPCore (x)
:name "(fmax (tanh x) 0.0)"
:precision binary64
(fmax (tanh x) 0.0))