
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.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 = (60.0d0 * ((x - y) / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 * ((x - y) / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 * ((x - y) / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -3.4e-103)
(* a 120.0)
(if (<= a 2.4e-288)
t_1
(if (<= a 7.6e-165)
(* 60.0 (/ x (- z t)))
(if (<= a 3.3e-66) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -3.4e-103) {
tmp = a * 120.0;
} else if (a <= 2.4e-288) {
tmp = t_1;
} else if (a <= 7.6e-165) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 3.3e-66) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
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 = (-60.0d0) * (y / (z - t))
if (a <= (-3.4d-103)) then
tmp = a * 120.0d0
else if (a <= 2.4d-288) then
tmp = t_1
else if (a <= 7.6d-165) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 3.3d-66) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -3.4e-103) {
tmp = a * 120.0;
} else if (a <= 2.4e-288) {
tmp = t_1;
} else if (a <= 7.6e-165) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 3.3e-66) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -3.4e-103: tmp = a * 120.0 elif a <= 2.4e-288: tmp = t_1 elif a <= 7.6e-165: tmp = 60.0 * (x / (z - t)) elif a <= 3.3e-66: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -3.4e-103) tmp = Float64(a * 120.0); elseif (a <= 2.4e-288) tmp = t_1; elseif (a <= 7.6e-165) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 3.3e-66) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -3.4e-103) tmp = a * 120.0; elseif (a <= 2.4e-288) tmp = t_1; elseif (a <= 7.6e-165) tmp = 60.0 * (x / (z - t)); elseif (a <= 3.3e-66) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.4e-103], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.4e-288], t$95$1, If[LessEqual[a, 7.6e-165], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.3e-66], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -3.4 \cdot 10^{-103}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-288}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{-165}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.40000000000000003e-103 or 3.2999999999999999e-66 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 70.0%
if -3.40000000000000003e-103 < a < 2.3999999999999998e-288 or 7.60000000000000037e-165 < a < 3.2999999999999999e-66Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 55.1%
if 2.3999999999999998e-288 < a < 7.60000000000000037e-165Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 77.5%
Final simplification67.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -2.7e-103)
(* a 120.0)
(if (<= a 7.6e-285)
t_1
(if (<= a 9.2e-139)
(* 60.0 (/ x z))
(if (<= a 3.2e-66) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -2.7e-103) {
tmp = a * 120.0;
} else if (a <= 7.6e-285) {
tmp = t_1;
} else if (a <= 9.2e-139) {
tmp = 60.0 * (x / z);
} else if (a <= 3.2e-66) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
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 = (-60.0d0) * (y / (z - t))
if (a <= (-2.7d-103)) then
tmp = a * 120.0d0
else if (a <= 7.6d-285) then
tmp = t_1
else if (a <= 9.2d-139) then
tmp = 60.0d0 * (x / z)
else if (a <= 3.2d-66) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -2.7e-103) {
tmp = a * 120.0;
} else if (a <= 7.6e-285) {
tmp = t_1;
} else if (a <= 9.2e-139) {
tmp = 60.0 * (x / z);
} else if (a <= 3.2e-66) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -2.7e-103: tmp = a * 120.0 elif a <= 7.6e-285: tmp = t_1 elif a <= 9.2e-139: tmp = 60.0 * (x / z) elif a <= 3.2e-66: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -2.7e-103) tmp = Float64(a * 120.0); elseif (a <= 7.6e-285) tmp = t_1; elseif (a <= 9.2e-139) tmp = Float64(60.0 * Float64(x / z)); elseif (a <= 3.2e-66) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -2.7e-103) tmp = a * 120.0; elseif (a <= 7.6e-285) tmp = t_1; elseif (a <= 9.2e-139) tmp = 60.0 * (x / z); elseif (a <= 3.2e-66) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e-103], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 7.6e-285], t$95$1, If[LessEqual[a, 9.2e-139], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e-66], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{-103}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{-285}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{-139}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.7000000000000001e-103 or 3.19999999999999982e-66 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 70.0%
if -2.7000000000000001e-103 < a < 7.6000000000000003e-285 or 9.2000000000000005e-139 < a < 3.19999999999999982e-66Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 56.9%
if 7.6000000000000003e-285 < a < 9.2000000000000005e-139Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 71.2%
Taylor expanded in z around inf 46.6%
Final simplification63.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-100) (not (<= (* a 120.0) 5e-162))) (+ (/ (* y -60.0) (- z t)) (* a 120.0)) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-100) || !((a * 120.0) <= 5e-162)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
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) :: tmp
if (((a * 120.0d0) <= (-1d-100)) .or. (.not. ((a * 120.0d0) <= 5d-162))) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-100) || !((a * 120.0) <= 5e-162)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-100) or not ((a * 120.0) <= 5e-162): tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e-100) || !(Float64(a * 120.0) <= 5e-162)) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e-100) || ~(((a * 120.0) <= 5e-162))) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-162]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-100} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-162}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e-100 or 5.00000000000000014e-162 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
Taylor expanded in x around 0 83.1%
if -1e-100 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000014e-162Initial program 99.7%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 87.8%
Final simplification84.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-40) (not (<= (* a 120.0) 5e-53))) (+ (* -60.0 (/ x t)) (* a 120.0)) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-40) || !((a * 120.0) <= 5e-53)) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
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) :: tmp
if (((a * 120.0d0) <= (-1d-40)) .or. (.not. ((a * 120.0d0) <= 5d-53))) then
tmp = ((-60.0d0) * (x / t)) + (a * 120.0d0)
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-40) || !((a * 120.0) <= 5e-53)) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-40) or not ((a * 120.0) <= 5e-53): tmp = (-60.0 * (x / t)) + (a * 120.0) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e-40) || !(Float64(a * 120.0) <= 5e-53)) tmp = Float64(Float64(-60.0 * Float64(x / t)) + Float64(a * 120.0)); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e-40) || ~(((a * 120.0) <= 5e-53))) tmp = (-60.0 * (x / t)) + (a * 120.0); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-40], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-53]], $MachinePrecision]], N[(N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-40} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-53}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999993e-41 or 5e-53 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
clear-num99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 88.1%
Taylor expanded in z around 0 78.0%
if -9.9999999999999993e-41 < (*.f64 a #s(literal 120 binary64)) < 5e-53Initial program 99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 81.7%
Final simplification79.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-40)
(+ (* -60.0 (/ x t)) (* a 120.0))
(if (<= (* a 120.0) 10000.0)
(* 60.0 (/ (- x y) (- z t)))
(+ (/ (* y -60.0) z) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-40) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else if ((a * 120.0) <= 10000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = ((y * -60.0) / z) + (a * 120.0);
}
return tmp;
}
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) :: tmp
if ((a * 120.0d0) <= (-1d-40)) then
tmp = ((-60.0d0) * (x / t)) + (a * 120.0d0)
else if ((a * 120.0d0) <= 10000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = ((y * (-60.0d0)) / z) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-40) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else if ((a * 120.0) <= 10000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = ((y * -60.0) / z) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-40: tmp = (-60.0 * (x / t)) + (a * 120.0) elif (a * 120.0) <= 10000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = ((y * -60.0) / z) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-40) tmp = Float64(Float64(-60.0 * Float64(x / t)) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 10000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(Float64(y * -60.0) / z) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-40) tmp = (-60.0 * (x / t)) + (a * 120.0); elseif ((a * 120.0) <= 10000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = ((y * -60.0) / z) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-40], N[(N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 10000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-40}:\\
\;\;\;\;-60 \cdot \frac{x}{t} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z} + a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999993e-41Initial program 99.9%
clear-num99.9%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 92.9%
Taylor expanded in z around 0 83.5%
if -9.9999999999999993e-41 < (*.f64 a #s(literal 120 binary64)) < 1e4Initial program 99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 80.2%
if 1e4 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
Taylor expanded in x around 0 89.5%
Taylor expanded in z around inf 77.5%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.35e-8) (not (<= y 6.4e+101))) (+ (/ (* y -60.0) (- z t)) (* a 120.0)) (+ (/ (* 60.0 x) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.35e-8) || !(y <= 6.4e+101)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
}
return tmp;
}
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) :: tmp
if ((y <= (-1.35d-8)) .or. (.not. (y <= 6.4d+101))) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = ((60.0d0 * x) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.35e-8) || !(y <= 6.4e+101)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.35e-8) or not (y <= 6.4e+101): tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = ((60.0 * x) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.35e-8) || !(y <= 6.4e+101)) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.35e-8) || ~((y <= 6.4e+101))) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = ((60.0 * x) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.35e-8], N[Not[LessEqual[y, 6.4e+101]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-8} \lor \neg \left(y \leq 6.4 \cdot 10^{+101}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -1.35000000000000001e-8 or 6.4000000000000001e101 < y Initial program 99.8%
Taylor expanded in x around 0 86.4%
if -1.35000000000000001e-8 < y < 6.4000000000000001e101Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.4%
associate-*r/94.3%
Simplified94.3%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.7e-198)
(* a 120.0)
(if (<= a 6.2e-285)
(* 60.0 (/ y t))
(if (<= a 9.5e-102) (* 60.0 (/ x z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e-198) {
tmp = a * 120.0;
} else if (a <= 6.2e-285) {
tmp = 60.0 * (y / t);
} else if (a <= 9.5e-102) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
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) :: tmp
if (a <= (-3.7d-198)) then
tmp = a * 120.0d0
else if (a <= 6.2d-285) then
tmp = 60.0d0 * (y / t)
else if (a <= 9.5d-102) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e-198) {
tmp = a * 120.0;
} else if (a <= 6.2e-285) {
tmp = 60.0 * (y / t);
} else if (a <= 9.5e-102) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e-198: tmp = a * 120.0 elif a <= 6.2e-285: tmp = 60.0 * (y / t) elif a <= 9.5e-102: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e-198) tmp = Float64(a * 120.0); elseif (a <= 6.2e-285) tmp = Float64(60.0 * Float64(y / t)); elseif (a <= 9.5e-102) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.7e-198) tmp = a * 120.0; elseif (a <= 6.2e-285) tmp = 60.0 * (y / t); elseif (a <= 9.5e-102) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e-198], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 6.2e-285], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e-102], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{-198}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-285}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-102}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.69999999999999971e-198 or 9.50000000000000025e-102 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 64.0%
if -3.69999999999999971e-198 < a < 6.2000000000000002e-285Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 61.7%
Taylor expanded in z around 0 35.4%
if 6.2000000000000002e-285 < a < 9.50000000000000025e-102Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 67.9%
Taylor expanded in z around inf 44.6%
Final simplification56.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.06e-42) (not (<= a 4.6e-28))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.06e-42) || !(a <= 4.6e-28)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
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) :: tmp
if ((a <= (-1.06d-42)) .or. (.not. (a <= 4.6d-28))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.06e-42) || !(a <= 4.6e-28)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.06e-42) or not (a <= 4.6e-28): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.06e-42) || !(a <= 4.6e-28)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.06e-42) || ~((a <= 4.6e-28))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.06e-42], N[Not[LessEqual[a, 4.6e-28]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.06 \cdot 10^{-42} \lor \neg \left(a \leq 4.6 \cdot 10^{-28}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.0600000000000001e-42 or 4.59999999999999971e-28 < a Initial program 99.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 74.0%
if -1.0600000000000001e-42 < a < 4.59999999999999971e-28Initial program 99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 81.2%
Final simplification77.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.2e-227) (not (<= a 1e-101))) (* a 120.0) (* 60.0 (/ x z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.2e-227) || !(a <= 1e-101)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
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) :: tmp
if ((a <= (-2.2d-227)) .or. (.not. (a <= 1d-101))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.2e-227) || !(a <= 1e-101)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.2e-227) or not (a <= 1e-101): tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.2e-227) || !(a <= 1e-101)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.2e-227) || ~((a <= 1e-101))) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.2e-227], N[Not[LessEqual[a, 1e-101]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-227} \lor \neg \left(a \leq 10^{-101}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if a < -2.19999999999999981e-227 or 1.00000000000000005e-101 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 61.5%
if -2.19999999999999981e-227 < a < 1.00000000000000005e-101Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 53.6%
Taylor expanded in z around inf 36.2%
Final simplification54.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.2e+267) (not (<= y 1.3e+201))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.2e+267) || !(y <= 1.3e+201)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
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) :: tmp
if ((y <= (-7.2d+267)) .or. (.not. (y <= 1.3d+201))) then
tmp = (-60.0d0) * (y / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.2e+267) || !(y <= 1.3e+201)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.2e+267) or not (y <= 1.3e+201): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.2e+267) || !(y <= 1.3e+201)) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -7.2e+267) || ~((y <= 1.3e+201))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.2e+267], N[Not[LessEqual[y, 1.3e+201]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+267} \lor \neg \left(y \leq 1.3 \cdot 10^{+201}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -7.19999999999999999e267 or 1.29999999999999993e201 < y Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 83.3%
Taylor expanded in z around inf 53.0%
if -7.19999999999999999e267 < y < 1.29999999999999993e201Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 54.0%
Final simplification53.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.5e-156) (not (<= a 2.4e-187))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.5e-156) || !(a <= 2.4e-187)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
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) :: tmp
if ((a <= (-9.5d-156)) .or. (.not. (a <= 2.4d-187))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.5e-156) || !(a <= 2.4e-187)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9.5e-156) or not (a <= 2.4e-187): tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.5e-156) || !(a <= 2.4e-187)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9.5e-156) || ~((a <= 2.4e-187))) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.5e-156], N[Not[LessEqual[a, 2.4e-187]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{-156} \lor \neg \left(a \leq 2.4 \cdot 10^{-187}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -9.4999999999999994e-156 or 2.40000000000000013e-187 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 62.8%
if -9.4999999999999994e-156 < a < 2.40000000000000013e-187Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 51.0%
Taylor expanded in z around 0 28.1%
Final simplification53.0%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.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 = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 48.8%
Final simplification48.8%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.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 = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024165
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))