
(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 18 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 (/ (- 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}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+46)
(* a 120.0)
(if (<= (* a 120.0) 2e-138)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 2e+27)
(+ (* a 120.0) (* -60.0 (/ y z)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+46) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-138) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 2e+27) {
tmp = (a * 120.0) + (-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 ((a * 120.0d0) <= (-4d+46)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-138) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 2d+27) then
tmp = (a * 120.0d0) + ((-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 ((a * 120.0) <= -4e+46) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-138) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 2e+27) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+46: tmp = a * 120.0 elif (a * 120.0) <= 2e-138: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 2e+27: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+46) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-138) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 2e+27) tmp = Float64(Float64(a * 120.0) + 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 ((a * 120.0) <= -4e+46) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-138) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 2e+27) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+46], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-138], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+46}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-138}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+27}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4e46 or 2e27 < (*.f64 a #s(literal 120 binary64)) Initial program 99.0%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.3%
if -4e46 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000013e-138Initial program 99.7%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in a around 0 78.7%
if 2.00000000000000013e-138 < (*.f64 a #s(literal 120 binary64)) < 2e27Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 79.4%
associate-*r/79.4%
remove-double-neg79.4%
neg-mul-179.4%
times-frac79.4%
metadata-eval79.4%
sub-neg79.4%
distribute-neg-in79.4%
remove-double-neg79.4%
+-commutative79.4%
sub-neg79.4%
Simplified79.4%
Taylor expanded in t around 0 71.0%
Final simplification77.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= z -4.75e+26)
t_2
(if (<= z -2.7e-100)
t_1
(if (<= z 1e-128)
(+ (* a 120.0) (/ (* x -60.0) t))
(if (<= z 5.8e-16) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -4.75e+26) {
tmp = t_2;
} else if (z <= -2.7e-100) {
tmp = t_1;
} else if (z <= 1e-128) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (z <= 5.8e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if (z <= (-4.75d+26)) then
tmp = t_2
else if (z <= (-2.7d-100)) then
tmp = t_1
else if (z <= 1d-128) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
else if (z <= 5.8d-16) then
tmp = t_1
else
tmp = t_2
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 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -4.75e+26) {
tmp = t_2;
} else if (z <= -2.7e-100) {
tmp = t_1;
} else if (z <= 1e-128) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (z <= 5.8e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if z <= -4.75e+26: tmp = t_2 elif z <= -2.7e-100: tmp = t_1 elif z <= 1e-128: tmp = (a * 120.0) + ((x * -60.0) / t) elif z <= 5.8e-16: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (z <= -4.75e+26) tmp = t_2; elseif (z <= -2.7e-100) tmp = t_1; elseif (z <= 1e-128) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); elseif (z <= 5.8e-16) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if (z <= -4.75e+26) tmp = t_2; elseif (z <= -2.7e-100) tmp = t_1; elseif (z <= 1e-128) tmp = (a * 120.0) + ((x * -60.0) / t); elseif (z <= 5.8e-16) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.75e+26], t$95$2, If[LessEqual[z, -2.7e-100], t$95$1, If[LessEqual[z, 1e-128], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-16], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -4.75 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-128}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.75000000000000027e26 or 5.7999999999999996e-16 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.0%
associate-*r/87.0%
remove-double-neg87.0%
neg-mul-187.0%
times-frac87.0%
metadata-eval87.0%
sub-neg87.0%
distribute-neg-in87.0%
remove-double-neg87.0%
+-commutative87.0%
sub-neg87.0%
Simplified87.0%
Taylor expanded in t around 0 82.3%
if -4.75000000000000027e26 < z < -2.70000000000000016e-100 or 1.00000000000000005e-128 < z < 5.7999999999999996e-16Initial program 97.8%
associate-/l*99.6%
fma-define99.5%
Simplified99.5%
Taylor expanded in a around 0 75.6%
if -2.70000000000000016e-100 < z < 1.00000000000000005e-128Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 83.7%
Taylor expanded in z around 0 80.3%
associate-*r/80.3%
Simplified80.3%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= z -1.7e+26)
t_2
(if (<= z -2e-97)
t_1
(if (<= z 4e-132)
(+ (* a 120.0) (* x (/ -60.0 t)))
(if (<= z 5.5e-16) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -1.7e+26) {
tmp = t_2;
} else if (z <= -2e-97) {
tmp = t_1;
} else if (z <= 4e-132) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else if (z <= 5.5e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if (z <= (-1.7d+26)) then
tmp = t_2
else if (z <= (-2d-97)) then
tmp = t_1
else if (z <= 4d-132) then
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
else if (z <= 5.5d-16) then
tmp = t_1
else
tmp = t_2
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 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -1.7e+26) {
tmp = t_2;
} else if (z <= -2e-97) {
tmp = t_1;
} else if (z <= 4e-132) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else if (z <= 5.5e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if z <= -1.7e+26: tmp = t_2 elif z <= -2e-97: tmp = t_1 elif z <= 4e-132: tmp = (a * 120.0) + (x * (-60.0 / t)) elif z <= 5.5e-16: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (z <= -1.7e+26) tmp = t_2; elseif (z <= -2e-97) tmp = t_1; elseif (z <= 4e-132) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); elseif (z <= 5.5e-16) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if (z <= -1.7e+26) tmp = t_2; elseif (z <= -2e-97) tmp = t_1; elseif (z <= 4e-132) tmp = (a * 120.0) + (x * (-60.0 / t)); elseif (z <= 5.5e-16) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+26], t$95$2, If[LessEqual[z, -2e-97], t$95$1, If[LessEqual[z, 4e-132], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-16], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-132}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.7000000000000001e26 or 5.49999999999999964e-16 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.0%
associate-*r/87.0%
remove-double-neg87.0%
neg-mul-187.0%
times-frac87.0%
metadata-eval87.0%
sub-neg87.0%
distribute-neg-in87.0%
remove-double-neg87.0%
+-commutative87.0%
sub-neg87.0%
Simplified87.0%
Taylor expanded in t around 0 82.3%
if -1.7000000000000001e26 < z < -2.00000000000000007e-97 or 3.9999999999999999e-132 < z < 5.49999999999999964e-16Initial program 97.8%
associate-/l*99.6%
fma-define99.5%
Simplified99.5%
Taylor expanded in a around 0 75.6%
if -2.00000000000000007e-97 < z < 3.9999999999999999e-132Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 83.7%
associate-/r/83.7%
Applied egg-rr83.7%
Taylor expanded in z around 0 80.2%
Final simplification80.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.1e+85) (not (<= y 1.2e-62))) (+ (* a 120.0) (* 60.0 (/ y (- t z)))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.1e+85) || !(y <= 1.2e-62)) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
}
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 <= (-2.1d+85)) .or. (.not. (y <= 1.2d-62))) then
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
else
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.1e+85) || !(y <= 1.2e-62)) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.1e+85) or not (y <= 1.2e-62): tmp = (a * 120.0) + (60.0 * (y / (t - z))) else: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.1e+85) || !(y <= 1.2e-62)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.1e+85) || ~((y <= 1.2e-62))) tmp = (a * 120.0) + (60.0 * (y / (t - z))); else tmp = (a * 120.0) + (60.0 / ((z - t) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.1e+85], N[Not[LessEqual[y, 1.2e-62]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+85} \lor \neg \left(y \leq 1.2 \cdot 10^{-62}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\end{array}
\end{array}
if y < -2.1000000000000001e85 or 1.19999999999999992e-62 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 86.7%
associate-*r/86.7%
remove-double-neg86.7%
neg-mul-186.7%
times-frac86.7%
metadata-eval86.7%
sub-neg86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
if -2.1000000000000001e85 < y < 1.19999999999999992e-62Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 96.6%
Final simplification91.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.1e+85) (not (<= y 1.2e-62))) (+ (* a 120.0) (* 60.0 (/ y (- t z)))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.1e+85) || !(y <= 1.2e-62)) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else {
tmp = (a * 120.0) + (x * (60.0 / (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 ((y <= (-2.1d+85)) .or. (.not. (y <= 1.2d-62))) then
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (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 ((y <= -2.1e+85) || !(y <= 1.2e-62)) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.1e+85) or not (y <= 1.2e-62): tmp = (a * 120.0) + (60.0 * (y / (t - z))) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.1e+85) || !(y <= 1.2e-62)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.1e+85) || ~((y <= 1.2e-62))) tmp = (a * 120.0) + (60.0 * (y / (t - z))); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.1e+85], N[Not[LessEqual[y, 1.2e-62]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+85} \lor \neg \left(y \leq 1.2 \cdot 10^{-62}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -2.1000000000000001e85 or 1.19999999999999992e-62 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 86.7%
associate-*r/86.7%
remove-double-neg86.7%
neg-mul-186.7%
times-frac86.7%
metadata-eval86.7%
sub-neg86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
if -2.1000000000000001e85 < y < 1.19999999999999992e-62Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 96.4%
associate-*r/95.8%
associate-*l/96.5%
*-commutative96.5%
Simplified96.5%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -6.4e+223) (not (<= x 5e+114))) (* 60.0 (/ (- x y) (- z t))) (+ (* a 120.0) (* 60.0 (/ y (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.4e+223) || !(x <= 5e+114)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (y / (t - 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 ((x <= (-6.4d+223)) .or. (.not. (x <= 5d+114))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.4e+223) || !(x <= 5e+114)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -6.4e+223) or not (x <= 5e+114): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (y / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -6.4e+223) || !(x <= 5e+114)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -6.4e+223) || ~((x <= 5e+114))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (y / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.4e+223], N[Not[LessEqual[x, 5e+114]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+223} \lor \neg \left(x \leq 5 \cdot 10^{+114}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if x < -6.4000000000000003e223 or 5.0000000000000001e114 < x Initial program 98.3%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in a around 0 78.8%
if -6.4000000000000003e223 < x < 5.0000000000000001e114Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 88.0%
associate-*r/88.0%
remove-double-neg88.0%
neg-mul-188.0%
times-frac88.0%
metadata-eval88.0%
sub-neg88.0%
distribute-neg-in88.0%
remove-double-neg88.0%
+-commutative88.0%
sub-neg88.0%
Simplified88.0%
Final simplification85.5%
(FPCore (x y z t a)
:precision binary64
(if (<= y -2.1e+85)
(+ (* a 120.0) (* 60.0 (/ y (- t z))))
(if (<= y 1.5e-62)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(+ (* a 120.0) (/ (* y -60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.1e+85) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else if (y <= 1.5e-62) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (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 (y <= (-2.1d+85)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
else if (y <= 1.5d-62) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (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 (y <= -2.1e+85) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else if (y <= 1.5e-62) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.1e+85: tmp = (a * 120.0) + (60.0 * (y / (t - z))) elif y <= 1.5e-62: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.1e+85) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); elseif (y <= 1.5e-62) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.1e+85) tmp = (a * 120.0) + (60.0 * (y / (t - z))); elseif (y <= 1.5e-62) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.1e+85], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-62], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+85}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-62}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -2.1000000000000001e85Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 92.6%
associate-*r/92.5%
remove-double-neg92.5%
neg-mul-192.5%
times-frac92.6%
metadata-eval92.6%
sub-neg92.6%
distribute-neg-in92.6%
remove-double-neg92.6%
+-commutative92.6%
sub-neg92.6%
Simplified92.6%
if -2.1000000000000001e85 < y < 1.5000000000000001e-62Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 96.6%
if 1.5000000000000001e-62 < y Initial program 99.8%
Taylor expanded in x around 0 83.7%
Final simplification91.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.7e+38) (not (<= a 7.4e-31))) (* 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 <= -6.7e+38) || !(a <= 7.4e-31)) {
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 <= (-6.7d+38)) .or. (.not. (a <= 7.4d-31))) 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 <= -6.7e+38) || !(a <= 7.4e-31)) {
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 <= -6.7e+38) or not (a <= 7.4e-31): 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 <= -6.7e+38) || !(a <= 7.4e-31)) 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 <= -6.7e+38) || ~((a <= 7.4e-31))) 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, -6.7e+38], N[Not[LessEqual[a, 7.4e-31]], $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 -6.7 \cdot 10^{+38} \lor \neg \left(a \leq 7.4 \cdot 10^{-31}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -6.70000000000000025e38 or 7.3999999999999996e-31 < a Initial program 99.1%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 75.7%
if -6.70000000000000025e38 < a < 7.3999999999999996e-31Initial program 99.7%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in a around 0 74.6%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.2e+89) (not (<= y 1.1e+126))) (* 60.0 (/ y (- t z))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.2e+89) || !(y <= 1.1e+126)) {
tmp = 60.0 * (y / (t - 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 <= (-4.2d+89)) .or. (.not. (y <= 1.1d+126))) then
tmp = 60.0d0 * (y / (t - 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 <= -4.2e+89) || !(y <= 1.1e+126)) {
tmp = 60.0 * (y / (t - z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.2e+89) or not (y <= 1.1e+126): tmp = 60.0 * (y / (t - z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.2e+89) || !(y <= 1.1e+126)) tmp = Float64(60.0 * Float64(y / Float64(t - 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 <= -4.2e+89) || ~((y <= 1.1e+126))) tmp = 60.0 * (y / (t - z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.2e+89], N[Not[LessEqual[y, 1.1e+126]], $MachinePrecision]], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+89} \lor \neg \left(y \leq 1.1 \cdot 10^{+126}\right):\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -4.19999999999999972e89 or 1.09999999999999999e126 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 88.5%
associate-*r/88.5%
remove-double-neg88.5%
neg-mul-188.5%
times-frac88.5%
metadata-eval88.5%
sub-neg88.5%
distribute-neg-in88.5%
remove-double-neg88.5%
+-commutative88.5%
sub-neg88.5%
Simplified88.5%
Taylor expanded in y around inf 60.5%
if -4.19999999999999972e89 < y < 1.09999999999999999e126Initial program 99.3%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around inf 60.0%
Final simplification60.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -7.5e+89) (* 60.0 (/ y (- t z))) (if (<= y 1.15e+125) (* a 120.0) (/ (* 60.0 y) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.5e+89) {
tmp = 60.0 * (y / (t - z));
} else if (y <= 1.15e+125) {
tmp = a * 120.0;
} else {
tmp = (60.0 * y) / (t - 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 (y <= (-7.5d+89)) then
tmp = 60.0d0 * (y / (t - z))
else if (y <= 1.15d+125) then
tmp = a * 120.0d0
else
tmp = (60.0d0 * y) / (t - z)
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.5e+89) {
tmp = 60.0 * (y / (t - z));
} else if (y <= 1.15e+125) {
tmp = a * 120.0;
} else {
tmp = (60.0 * y) / (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7.5e+89: tmp = 60.0 * (y / (t - z)) elif y <= 1.15e+125: tmp = a * 120.0 else: tmp = (60.0 * y) / (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7.5e+89) tmp = Float64(60.0 * Float64(y / Float64(t - z))); elseif (y <= 1.15e+125) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 * y) / Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7.5e+89) tmp = 60.0 * (y / (t - z)); elseif (y <= 1.15e+125) tmp = a * 120.0; else tmp = (60.0 * y) / (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.5e+89], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+125], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+89}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+125}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot y}{t - z}\\
\end{array}
\end{array}
if y < -7.49999999999999947e89Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 92.1%
associate-*r/91.9%
remove-double-neg91.9%
neg-mul-191.9%
times-frac92.1%
metadata-eval92.1%
sub-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
+-commutative92.1%
sub-neg92.1%
Simplified92.1%
Taylor expanded in y around inf 65.7%
if -7.49999999999999947e89 < y < 1.15000000000000006e125Initial program 99.3%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around inf 60.0%
if 1.15000000000000006e125 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 85.1%
associate-*r/85.2%
remove-double-neg85.2%
neg-mul-185.2%
times-frac85.1%
metadata-eval85.1%
sub-neg85.1%
distribute-neg-in85.1%
remove-double-neg85.1%
+-commutative85.1%
sub-neg85.1%
Simplified85.1%
Taylor expanded in y around inf 55.6%
*-commutative55.6%
associate-*l/55.7%
Applied egg-rr55.7%
Final simplification60.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.2e-199) (not (<= a 9e-141))) (* a 120.0) (/ (* y -60.0) z)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.2e-199) || !(a <= 9e-141)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / 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 <= (-8.2d-199)) .or. (.not. (a <= 9d-141))) then
tmp = a * 120.0d0
else
tmp = (y * (-60.0d0)) / 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 <= -8.2e-199) || !(a <= 9e-141)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.2e-199) or not (a <= 9e-141): tmp = a * 120.0 else: tmp = (y * -60.0) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.2e-199) || !(a <= 9e-141)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.2e-199) || ~((a <= 9e-141))) tmp = a * 120.0; else tmp = (y * -60.0) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.2e-199], N[Not[LessEqual[a, 9e-141]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{-199} \lor \neg \left(a \leq 9 \cdot 10^{-141}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if a < -8.20000000000000043e-199 or 9.0000000000000001e-141 < a Initial program 99.3%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 59.8%
if -8.20000000000000043e-199 < a < 9.0000000000000001e-141Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 57.8%
associate-*r/57.8%
remove-double-neg57.8%
neg-mul-157.8%
times-frac57.8%
metadata-eval57.8%
sub-neg57.8%
distribute-neg-in57.8%
remove-double-neg57.8%
+-commutative57.8%
sub-neg57.8%
Simplified57.8%
Taylor expanded in y around inf 48.8%
*-commutative48.8%
associate-*l/48.9%
Applied egg-rr48.9%
Taylor expanded in t around 0 32.4%
associate-*r/32.4%
Simplified32.4%
Final simplification54.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.1e-198) (not (<= a 9.5e-141))) (* a 120.0) (/ -60.0 (/ z y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.1e-198) || !(a <= 9.5e-141)) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (z / y);
}
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.1d-198)) .or. (.not. (a <= 9.5d-141))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) / (z / y)
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.1e-198) || !(a <= 9.5e-141)) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (z / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.1e-198) or not (a <= 9.5e-141): tmp = a * 120.0 else: tmp = -60.0 / (z / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.1e-198) || !(a <= 9.5e-141)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.1e-198) || ~((a <= 9.5e-141))) tmp = a * 120.0; else tmp = -60.0 / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.1e-198], N[Not[LessEqual[a, 9.5e-141]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-198} \lor \neg \left(a \leq 9.5 \cdot 10^{-141}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z}{y}}\\
\end{array}
\end{array}
if a < -1.1e-198 or 9.49999999999999996e-141 < a Initial program 99.3%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 59.8%
if -1.1e-198 < a < 9.49999999999999996e-141Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 57.8%
associate-*r/57.8%
remove-double-neg57.8%
neg-mul-157.8%
times-frac57.8%
metadata-eval57.8%
sub-neg57.8%
distribute-neg-in57.8%
remove-double-neg57.8%
+-commutative57.8%
sub-neg57.8%
Simplified57.8%
Taylor expanded in y around inf 48.8%
Taylor expanded in t around 0 32.4%
clear-num32.4%
un-div-inv32.4%
Applied egg-rr32.4%
Final simplification54.1%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
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) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-/l*99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
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) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -4.1e+90) (* y (/ -60.0 z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.1e+90) {
tmp = y * (-60.0 / 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 <= (-4.1d+90)) then
tmp = y * ((-60.0d0) / 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 <= -4.1e+90) {
tmp = y * (-60.0 / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.1e+90: tmp = y * (-60.0 / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.1e+90) tmp = Float64(y * Float64(-60.0 / 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 <= -4.1e+90) tmp = y * (-60.0 / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.1e+90], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+90}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -4.10000000000000042e90Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 92.1%
associate-*r/91.9%
remove-double-neg91.9%
neg-mul-191.9%
times-frac92.1%
metadata-eval92.1%
sub-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
+-commutative92.1%
sub-neg92.1%
Simplified92.1%
Taylor expanded in y around inf 65.7%
Taylor expanded in t around 0 44.9%
clear-num44.9%
un-div-inv44.9%
Applied egg-rr44.9%
associate-/r/44.9%
Simplified44.9%
if -4.10000000000000042e90 < y Initial program 99.4%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around inf 54.0%
Final simplification52.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.2e+90) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.2e+90) {
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 <= (-3.2d+90)) 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 <= -3.2e+90) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.2e+90: tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.2e+90) 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 <= -3.2e+90) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.2e+90], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+90}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -3.19999999999999998e90Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 92.1%
associate-*r/91.9%
remove-double-neg91.9%
neg-mul-191.9%
times-frac92.1%
metadata-eval92.1%
sub-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
+-commutative92.1%
sub-neg92.1%
Simplified92.1%
Taylor expanded in y around inf 65.7%
Taylor expanded in t around 0 44.9%
if -3.19999999999999998e90 < y Initial program 99.4%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around inf 54.0%
Final simplification52.6%
(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.4%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around inf 50.0%
Final simplification50.0%
(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 2024177
(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)))