(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* (- y x) z) t)))
(if (<= t -6e-14)
(+ x (if (!= (- y x) 0.0) (/ z (/ t (- y x))) t_1))
(if (<= t 5e+56) (+ x t_1) (+ x (* (/ z t) (- y x)))))))
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((y - x) * z) / t)
end function
↓
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
real(8) :: tmp_1
real(8) :: tmp_2
t_1 = ((y - x) * z) / t
if (t <= (-6d-14)) then
if ((y - x) /= 0.0d0) then
tmp_2 = z / (t / (y - x))
else
tmp_2 = t_1
end if
tmp_1 = x + tmp_2
else if (t <= 5d+56) then
tmp_1 = x + t_1
else
tmp_1 = x + ((z / t) * (y - x))
end if
code = tmp_1
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
↓
public static double code(double x, double y, double z, double t) {
double t_1 = ((y - x) * z) / t;
double tmp_1;
if (t <= -6e-14) {
double tmp_2;
if ((y - x) != 0.0) {
tmp_2 = z / (t / (y - x));
} else {
tmp_2 = t_1;
}
tmp_1 = x + tmp_2;
} else if (t <= 5e+56) {
tmp_1 = x + t_1;
} else {
tmp_1 = x + ((z / t) * (y - x));
}
return tmp_1;
}
def code(x, y, z, t):
return x + (((y - x) * z) / t)
↓
def code(x, y, z, t):
t_1 = ((y - x) * z) / t
tmp_1 = 0
if t <= -6e-14:
tmp_2 = 0
if (y - x) != 0.0:
tmp_2 = z / (t / (y - x))
else:
tmp_2 = t_1
tmp_1 = x + tmp_2
elif t <= 5e+56:
tmp_1 = x + t_1
else:
tmp_1 = x + ((z / t) * (y - x))
return tmp_1
function code(x, y, z, t)
return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
herbie shell --seed 2023010
(FPCore (x y z t)
:name "Numeric.Histogram:binBounds from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))
(+ x (/ (* (- y x) z) t)))