(FPCore (x y z) :precision binary64 (/ (* x (+ y z)) z))
↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (* x (+ y z)) z)))
(if (<= t_0 -2e+302)
(/ x (/ z (+ y z)))
(if (<= t_0 -1e-33)
t_0
(if (<= t_0 5e-133)
(+ x (* x (/ y z)))
(if (<= t_0 4e+289) t_0 (* x (/ (+ y z) z))))))))
double code(double x, double y, double z) {
double t_0 = (x * (y + z)) / z;
double tmp;
if (t_0 <= -2e+302) {
tmp = x / (z / (y + z));
} else if (t_0 <= -1e-33) {
tmp = t_0;
} else if (t_0 <= 5e-133) {
tmp = x + (x * (y / z));
} else if (t_0 <= 4e+289) {
tmp = t_0;
} else {
tmp = x * ((y + z) / z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (y + z)) / z
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x * (y + z)) / z
if (t_0 <= (-2d+302)) then
tmp = x / (z / (y + z))
else if (t_0 <= (-1d-33)) then
tmp = t_0
else if (t_0 <= 5d-133) then
tmp = x + (x * (y / z))
else if (t_0 <= 4d+289) then
tmp = t_0
else
tmp = x * ((y + z) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return (x * (y + z)) / z;
}
↓
public static double code(double x, double y, double z) {
double t_0 = (x * (y + z)) / z;
double tmp;
if (t_0 <= -2e+302) {
tmp = x / (z / (y + z));
} else if (t_0 <= -1e-33) {
tmp = t_0;
} else if (t_0 <= 5e-133) {
tmp = x + (x * (y / z));
} else if (t_0 <= 4e+289) {
tmp = t_0;
} else {
tmp = x * ((y + z) / z);
}
return tmp;
}
def code(x, y, z):
return (x * (y + z)) / z
↓
def code(x, y, z):
t_0 = (x * (y + z)) / z
tmp = 0
if t_0 <= -2e+302:
tmp = x / (z / (y + z))
elif t_0 <= -1e-33:
tmp = t_0
elif t_0 <= 5e-133:
tmp = x + (x * (y / z))
elif t_0 <= 4e+289:
tmp = t_0
else:
tmp = x * ((y + z) / z)
return tmp
function code(x, y, z)
return Float64(Float64(x * Float64(y + z)) / z)
end
if -2.0000000000000002e302 < (/.f64 (*.f64 x (+.f64 y z)) z) < -1.0000000000000001e-33 or 4.9999999999999999e-133 < (/.f64 (*.f64 x (+.f64 y z)) z) < 4.0000000000000002e289
Initial program 99.6%
\[\frac{x \cdot \left(y + z\right)}{z}
\]
if -1.0000000000000001e-33 < (/.f64 (*.f64 x (+.f64 y z)) z) < 4.9999999999999999e-133
herbie shell --seed 2023137
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(/ x (/ z (+ y z)))
(/ (* x (+ y z)) z))