(FPCore (x y z) :precision binary64 (/ (* x y) (* (* z z) (+ z 1.0))))
↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (* z z) (+ z 1.0))))
(if (<= t_0 -1e+19)
(/ (* (/ (/ x z) z) y) (+ z 1.0))
(if (<= t_0 2e-158)
(/ (/ x (/ z y)) z)
(/ (/ y (+ z 1.0)) (* z (/ z x)))))))
double code(double x, double y, double z) {
double t_0 = (z * z) * (z + 1.0);
double tmp;
if (t_0 <= -1e+19) {
tmp = (((x / z) / z) * y) / (z + 1.0);
} else if (t_0 <= 2e-158) {
tmp = (x / (z / y)) / z;
} else {
tmp = (y / (z + 1.0)) / (z * (z / x));
}
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) * (z + 1.0d0))
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 = (z * z) * (z + 1.0d0)
if (t_0 <= (-1d+19)) then
tmp = (((x / z) / z) * y) / (z + 1.0d0)
else if (t_0 <= 2d-158) then
tmp = (x / (z / y)) / z
else
tmp = (y / (z + 1.0d0)) / (z * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
↓
public static double code(double x, double y, double z) {
double t_0 = (z * z) * (z + 1.0);
double tmp;
if (t_0 <= -1e+19) {
tmp = (((x / z) / z) * y) / (z + 1.0);
} else if (t_0 <= 2e-158) {
tmp = (x / (z / y)) / z;
} else {
tmp = (y / (z + 1.0)) / (z * (z / x));
}
return tmp;
}
def code(x, y, z):
return (x * y) / ((z * z) * (z + 1.0))
↓
def code(x, y, z):
t_0 = (z * z) * (z + 1.0)
tmp = 0
if t_0 <= -1e+19:
tmp = (((x / z) / z) * y) / (z + 1.0)
elif t_0 <= 2e-158:
tmp = (x / (z / y)) / z
else:
tmp = (y / (z + 1.0)) / (z * (z / x))
return tmp
function code(x, y, z)
return Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(z + 1.0)))
end
herbie shell --seed 2022364
(FPCore (x y z)
:name "Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1.0 z)) x) z))
(/ (* x y) (* (* z z) (+ z 1.0))))