(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
↓
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (* (- y z) (/ 1.0 (- a z))))))
(t_2 (- x (/ (* (- y z) (- x t)) (- a z)))))
(if (<= t_2 -5e-296)
t_1
(if (<= t_2 0.0) (- t (/ (* (- t x) (- y a)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
↓
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * ((y - z) * (1.0 / (a - z))));
double t_2 = x - (((y - z) * (x - t)) / (a - z));
double tmp;
if (t_2 <= -5e-296) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
↓
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t - x) * ((y - z) * (1.0d0 / (a - z))))
t_2 = x - (((y - z) * (x - t)) / (a - z))
if (t_2 <= (-5d-296)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = t - (((t - x) * (y - a)) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
↓
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * ((y - z) * (1.0 / (a - z))));
double t_2 = x - (((y - z) * (x - t)) / (a - z));
double tmp;
if (t_2 <= -5e-296) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a):
return x + (((y - z) * (t - x)) / (a - z))
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -5.0000000000000003e-296 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))
(-.f64 t (/.f64 (*.f64 (-.f64 t x) (-.f64 y a)) z)): 0 points increase in error, 0 points decrease in error
(-.f64 t (/.f64 (Rewrite<= distribute-rgt-out--_binary64 (-.f64 (*.f64 y (-.f64 t x)) (*.f64 a (-.f64 t x)))) z)): 0 points increase in error, 0 points decrease in error
(-.f64 t (/.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (*.f64 y (-.f64 t x)) (neg.f64 (*.f64 a (-.f64 t x))))) z)): 0 points increase in error, 0 points decrease in error
(-.f64 t (/.f64 (+.f64 (*.f64 y (-.f64 t x)) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 a (-.f64 t x))))) z)): 0 points increase in error, 0 points decrease in error
(-.f64 t (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (*.f64 a (-.f64 t x))) (*.f64 y (-.f64 t x)))) z)): 0 points increase in error, 0 points decrease in error
(Rewrite<= unsub-neg_binary64 (+.f64 t (neg.f64 (/.f64 (+.f64 (*.f64 -1 (*.f64 a (-.f64 t x))) (*.f64 y (-.f64 t x))) z)))): 0 points increase in error, 0 points decrease in error
(+.f64 t (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (+.f64 (*.f64 -1 (*.f64 a (-.f64 t x))) (*.f64 y (-.f64 t x))) z)))): 0 points increase in error, 0 points decrease in error
(Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 (+.f64 (*.f64 -1 (*.f64 a (-.f64 t x))) (*.f64 y (-.f64 t x))) z)) t)): 0 points increase in error, 0 points decrease in error
herbie shell --seed 2022308
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))