(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ (* (- z x) y) t))))
(if (<= t_1 -4e-178)
(+ x (* (- z x) (/ y t)))
(if (<= t_1 1e+289) t_1 (+ x (/ y (/ t (- z x))))))))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
↓
double code(double x, double y, double z, double t) {
double t_1 = x + (((z - x) * y) / t);
double tmp;
if (t_1 <= -4e-178) {
tmp = x + ((z - x) * (y / t));
} else if (t_1 <= 1e+289) {
tmp = t_1;
} else {
tmp = x + (y / (t / (z - x)));
}
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 * (z - x)) / 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 - x) * y) / t)
if (t_1 <= (-4d-178)) then
tmp = x + ((z - x) * (y / t))
else if (t_1 <= 1d+289) then
tmp = t_1
else
tmp = x + (y / (t / (z - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
↓
public static double code(double x, double y, double z, double t) {
double t_1 = x + (((z - x) * y) / t);
double tmp;
if (t_1 <= -4e-178) {
tmp = x + ((z - x) * (y / t));
} else if (t_1 <= 1e+289) {
tmp = t_1;
} else {
tmp = x + (y / (t / (z - x)));
}
return tmp;
}
def code(x, y, z, t):
return x + ((y * (z - x)) / t)
↓
def code(x, y, z, t):
t_1 = x + (((z - x) * y) / t)
tmp = 0
if t_1 <= -4e-178:
tmp = x + ((z - x) * (y / t))
elif t_1 <= 1e+289:
tmp = t_1
else:
tmp = x + (y / (t / (z - x)))
return tmp
function code(x, y, z, t)
return Float64(x + Float64(Float64(y * Float64(z - x)) / t))
end
herbie shell --seed 2023060
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:herbie-target
(- x (+ (* x (/ y t)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))