(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
↓
(FPCore (x y z t)
:precision binary64
(if (<= y -1e-221) (+ x (/ y (/ t (- z x)))) (+ x (* (- z x) (/ y t)))))
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 tmp;
if (y <= -1e-221) {
tmp = x + (y / (t / (z - x)));
} else {
tmp = x + ((z - x) * (y / t));
}
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) :: tmp
if (y <= (-1d-221)) then
tmp = x + (y / (t / (z - x)))
else
tmp = x + ((z - x) * (y / t))
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 tmp;
if (y <= -1e-221) {
tmp = x + (y / (t / (z - x)));
} else {
tmp = x + ((z - x) * (y / t));
}
return tmp;
}
def code(x, y, z, t):
return x + ((y * (z - x)) / t)
↓
def code(x, y, z, t):
tmp = 0
if y <= -1e-221:
tmp = x + (y / (t / (z - x)))
else:
tmp = x + ((z - x) * (y / t))
return tmp
function code(x, y, z, t)
return Float64(x + Float64(Float64(y * Float64(z - x)) / t))
end
↓
function code(x, y, z, t)
tmp = 0.0
if (y <= -1e-221)
tmp = Float64(x + Float64(y / Float64(t / Float64(z - x))));
else
tmp = Float64(x + Float64(Float64(z - x) * Float64(y / t)));
end
return tmp
end
function tmp = code(x, y, z, t)
tmp = x + ((y * (z - x)) / t);
end
↓
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -1e-221)
tmp = x + (y / (t / (z - x)));
else
tmp = x + ((z - x) * (y / t));
end
tmp_2 = tmp;
end
herbie shell --seed 2022343
(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)))