(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ z (/ t y)))))
(if (<= t -1.4e-26)
t_1
(if (<= t 3.1e-85)
(/ (* z (- y x)) t)
(if (<= t 6.939414757175626e+123) (- x (* x (/ z t))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x + (z / (t / y));
double tmp;
if (t <= -1.4e-26) {
tmp = t_1;
} else if (t <= 3.1e-85) {
tmp = (z * (y - x)) / t;
} else if (t <= 6.939414757175626e+123) {
tmp = x - (x * (z / t));
} else {
tmp = t_1;
}
return tmp;
}
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
t_1 = x + (z / (t / y))
if (t <= (-1.4d-26)) then
tmp = t_1
else if (t <= 3.1d-85) then
tmp = (z * (y - x)) / t
else if (t <= 6.939414757175626d+123) then
tmp = x - (x * (z / t))
else
tmp = t_1
end if
code = tmp
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 = x + (z / (t / y));
double tmp;
if (t <= -1.4e-26) {
tmp = t_1;
} else if (t <= 3.1e-85) {
tmp = (z * (y - x)) / t;
} else if (t <= 6.939414757175626e+123) {
tmp = x - (x * (z / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t):
return x + (((y - x) * z) / t)
↓
def code(x, y, z, t):
t_1 = x + (z / (t / y))
tmp = 0
if t <= -1.4e-26:
tmp = t_1
elif t <= 3.1e-85:
tmp = (z * (y - x)) / t
elif t <= 6.939414757175626e+123:
tmp = x - (x * (z / t))
else:
tmp = t_1
return tmp
function code(x, y, z, t)
return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
herbie shell --seed 2022228
(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)))