\[\begin{array}{l}
t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+271} \lor \neg \left(t_1 \leq 5 \cdot 10^{+223}\right):\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}} + \frac{t}{2} \cdot \frac{z \cdot -9}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\
\end{array}
\]
(FPCore (x y z t a)
:precision binary64
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))
↓
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* x y) (* t (* z -9.0)))))
(if (or (<= t_1 -5e+271) (not (<= t_1 5e+223)))
(+ (* 0.5 (/ x (/ a y))) (* (/ t 2.0) (/ (* z -9.0) a)))
(/ (+ (* x y) (* z (* t -9.0))) (* a 2.0)))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - ((z * 9.0d0) * t)) / (a * 2.0d0)
end function
↓
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) + (t * (z * (-9.0d0)))
if ((t_1 <= (-5d+271)) .or. (.not. (t_1 <= 5d+223))) then
tmp = (0.5d0 * (x / (a / y))) + ((t / 2.0d0) * ((z * (-9.0d0)) / a))
else
tmp = ((x * y) + (z * (t * (-9.0d0)))) / (a * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
↓
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) + (t * (z * -9.0));
double tmp;
if ((t_1 <= -5e+271) || !(t_1 <= 5e+223)) {
tmp = (0.5 * (x / (a / y))) + ((t / 2.0) * ((z * -9.0) / a));
} else {
tmp = ((x * y) + (z * (t * -9.0))) / (a * 2.0);
}
return tmp;
}
def code(x, y, z, t, a):
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0)
↓
def code(x, y, z, t, a):
t_1 = (x * y) + (t * (z * -9.0))
tmp = 0
if (t_1 <= -5e+271) or not (t_1 <= 5e+223):
tmp = (0.5 * (x / (a / y))) + ((t / 2.0) * ((z * -9.0) / a))
else:
tmp = ((x * y) + (z * (t * -9.0))) / (a * 2.0)
return tmp
function code(x, y, z, t, a)
return Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a * 2.0))
end
herbie shell --seed 2023115
(FPCore (x y z t a)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I"
:precision binary64
:herbie-target
(if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))