
(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 20 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 (fma (- x y) (/ -60.0 (- t z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma((x - y), (-60.0 / (t - z)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(Float64(x - y), Float64(-60.0 / Float64(t - z)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(N[(x - y), $MachinePrecision] * N[(-60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x - y, \frac{-60}{t - z}, a \cdot 120\right)
\end{array}
Initial program 99.0%
*-commutative99.0%
associate-/l*99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
neg-sub099.4%
associate-+l-99.4%
sub0-neg99.4%
distribute-frac-neg299.4%
distribute-neg-frac99.4%
metadata-eval99.4%
Simplified99.4%
Final simplification99.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) (/ -60.0 t))) (t_2 (* 60.0 (/ (- x y) z))))
(if (<= (- x y) -4e+177)
t_2
(if (<= (- x y) -4e+100)
t_1
(if (<= (- x y) 2e+204)
(* a 120.0)
(if (<= (- x y) 1e+236) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (-60.0 / t);
double t_2 = 60.0 * ((x - y) / z);
double tmp;
if ((x - y) <= -4e+177) {
tmp = t_2;
} else if ((x - y) <= -4e+100) {
tmp = t_1;
} else if ((x - y) <= 2e+204) {
tmp = a * 120.0;
} else if ((x - y) <= 1e+236) {
tmp = t_2;
} else {
tmp = t_1;
}
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 = (x - y) * ((-60.0d0) / t)
t_2 = 60.0d0 * ((x - y) / z)
if ((x - y) <= (-4d+177)) then
tmp = t_2
else if ((x - y) <= (-4d+100)) then
tmp = t_1
else if ((x - y) <= 2d+204) then
tmp = a * 120.0d0
else if ((x - y) <= 1d+236) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (-60.0 / t);
double t_2 = 60.0 * ((x - y) / z);
double tmp;
if ((x - y) <= -4e+177) {
tmp = t_2;
} else if ((x - y) <= -4e+100) {
tmp = t_1;
} else if ((x - y) <= 2e+204) {
tmp = a * 120.0;
} else if ((x - y) <= 1e+236) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (-60.0 / t) t_2 = 60.0 * ((x - y) / z) tmp = 0 if (x - y) <= -4e+177: tmp = t_2 elif (x - y) <= -4e+100: tmp = t_1 elif (x - y) <= 2e+204: tmp = a * 120.0 elif (x - y) <= 1e+236: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(-60.0 / t)) t_2 = Float64(60.0 * Float64(Float64(x - y) / z)) tmp = 0.0 if (Float64(x - y) <= -4e+177) tmp = t_2; elseif (Float64(x - y) <= -4e+100) tmp = t_1; elseif (Float64(x - y) <= 2e+204) tmp = Float64(a * 120.0); elseif (Float64(x - y) <= 1e+236) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (-60.0 / t); t_2 = 60.0 * ((x - y) / z); tmp = 0.0; if ((x - y) <= -4e+177) tmp = t_2; elseif ((x - y) <= -4e+100) tmp = t_1; elseif ((x - y) <= 2e+204) tmp = a * 120.0; elseif ((x - y) <= 1e+236) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x - y), $MachinePrecision], -4e+177], t$95$2, If[LessEqual[N[(x - y), $MachinePrecision], -4e+100], t$95$1, If[LessEqual[N[(x - y), $MachinePrecision], 2e+204], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 1e+236], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{-60}{t}\\
t_2 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;x - y \leq -4 \cdot 10^{+177}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x - y \leq -4 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+204}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x - y \leq 10^{+236}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x y) < -4e177 or 1.99999999999999998e204 < (-.f64 x y) < 1.00000000000000005e236Initial program 97.1%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in a around 0 76.4%
associate-*r/75.2%
*-rgt-identity75.2%
times-frac76.4%
/-rgt-identity76.4%
Simplified76.4%
clear-num76.3%
inv-pow76.3%
div-inv76.4%
metadata-eval76.4%
Applied egg-rr76.4%
unpow-176.4%
Simplified76.4%
Taylor expanded in z around inf 53.6%
if -4e177 < (-.f64 x y) < -4.00000000000000006e100 or 1.00000000000000005e236 < (-.f64 x y) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 80.6%
associate-*r/80.6%
*-rgt-identity80.6%
times-frac80.5%
/-rgt-identity80.5%
Simplified80.5%
Taylor expanded in z around 0 62.1%
if -4.00000000000000006e100 < (-.f64 x y) < 1.99999999999999998e204Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.1%
Final simplification62.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) -60.0) t)))
(if (<= (- x y) -4e+177)
(* (- x y) (/ 60.0 z))
(if (<= (- x y) -4e+100)
t_1
(if (<= (- x y) 2e+204)
(* a 120.0)
(if (<= (- x y) 1e+236) (* 60.0 (/ (- x y) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * -60.0) / t;
double tmp;
if ((x - y) <= -4e+177) {
tmp = (x - y) * (60.0 / z);
} else if ((x - y) <= -4e+100) {
tmp = t_1;
} else if ((x - y) <= 2e+204) {
tmp = a * 120.0;
} else if ((x - y) <= 1e+236) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = t_1;
}
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 = ((x - y) * (-60.0d0)) / t
if ((x - y) <= (-4d+177)) then
tmp = (x - y) * (60.0d0 / z)
else if ((x - y) <= (-4d+100)) then
tmp = t_1
else if ((x - y) <= 2d+204) then
tmp = a * 120.0d0
else if ((x - y) <= 1d+236) then
tmp = 60.0d0 * ((x - y) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * -60.0) / t;
double tmp;
if ((x - y) <= -4e+177) {
tmp = (x - y) * (60.0 / z);
} else if ((x - y) <= -4e+100) {
tmp = t_1;
} else if ((x - y) <= 2e+204) {
tmp = a * 120.0;
} else if ((x - y) <= 1e+236) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * -60.0) / t tmp = 0 if (x - y) <= -4e+177: tmp = (x - y) * (60.0 / z) elif (x - y) <= -4e+100: tmp = t_1 elif (x - y) <= 2e+204: tmp = a * 120.0 elif (x - y) <= 1e+236: tmp = 60.0 * ((x - y) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * -60.0) / t) tmp = 0.0 if (Float64(x - y) <= -4e+177) tmp = Float64(Float64(x - y) * Float64(60.0 / z)); elseif (Float64(x - y) <= -4e+100) tmp = t_1; elseif (Float64(x - y) <= 2e+204) tmp = Float64(a * 120.0); elseif (Float64(x - y) <= 1e+236) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x - y) * -60.0) / t; tmp = 0.0; if ((x - y) <= -4e+177) tmp = (x - y) * (60.0 / z); elseif ((x - y) <= -4e+100) tmp = t_1; elseif ((x - y) <= 2e+204) tmp = a * 120.0; elseif ((x - y) <= 1e+236) tmp = 60.0 * ((x - y) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[N[(x - y), $MachinePrecision], -4e+177], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], -4e+100], t$95$1, If[LessEqual[N[(x - y), $MachinePrecision], 2e+204], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 1e+236], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot -60}{t}\\
\mathbf{if}\;x - y \leq -4 \cdot 10^{+177}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{elif}\;x - y \leq -4 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+204}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x - y \leq 10^{+236}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x y) < -4e177Initial program 96.5%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in a around 0 76.2%
associate-*r/74.6%
*-rgt-identity74.6%
times-frac76.1%
/-rgt-identity76.1%
Simplified76.1%
Taylor expanded in z around inf 48.7%
if -4e177 < (-.f64 x y) < -4.00000000000000006e100 or 1.00000000000000005e236 < (-.f64 x y) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 80.6%
associate-*r/80.6%
*-rgt-identity80.6%
times-frac80.5%
/-rgt-identity80.5%
Simplified80.5%
Taylor expanded in z around 0 62.1%
associate-*l/62.2%
Applied egg-rr62.2%
if -4.00000000000000006e100 < (-.f64 x y) < 1.99999999999999998e204Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.1%
if 1.99999999999999998e204 < (-.f64 x y) < 1.00000000000000005e236Initial program 99.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 77.5%
associate-*r/77.8%
*-rgt-identity77.8%
times-frac77.5%
/-rgt-identity77.5%
Simplified77.5%
clear-num77.7%
inv-pow77.7%
div-inv77.7%
metadata-eval77.7%
Applied egg-rr77.7%
unpow-177.7%
Simplified77.7%
Taylor expanded in z around inf 77.7%
Final simplification62.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ (- x y) t))))
(t_2 (+ (* a 120.0) (* 60.0 (/ x z)))))
(if (<= z -7e+81)
t_2
(if (<= z -2.4e-90)
t_1
(if (<= z -1.8e-197)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 3.8e-97)
t_1
(if (<= z 2.6e+76)
(/ (- x y) (* (- z t) 0.016666666666666666))
t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * ((x - y) / t));
double t_2 = (a * 120.0) + (60.0 * (x / z));
double tmp;
if (z <= -7e+81) {
tmp = t_2;
} else if (z <= -2.4e-90) {
tmp = t_1;
} else if (z <= -1.8e-197) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 3.8e-97) {
tmp = t_1;
} else if (z <= 2.6e+76) {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
} 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 = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
t_2 = (a * 120.0d0) + (60.0d0 * (x / z))
if (z <= (-7d+81)) then
tmp = t_2
else if (z <= (-2.4d-90)) then
tmp = t_1
else if (z <= (-1.8d-197)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 3.8d-97) then
tmp = t_1
else if (z <= 2.6d+76) then
tmp = (x - y) / ((z - t) * 0.016666666666666666d0)
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 = (a * 120.0) + (-60.0 * ((x - y) / t));
double t_2 = (a * 120.0) + (60.0 * (x / z));
double tmp;
if (z <= -7e+81) {
tmp = t_2;
} else if (z <= -2.4e-90) {
tmp = t_1;
} else if (z <= -1.8e-197) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 3.8e-97) {
tmp = t_1;
} else if (z <= 2.6e+76) {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * ((x - y) / t)) t_2 = (a * 120.0) + (60.0 * (x / z)) tmp = 0 if z <= -7e+81: tmp = t_2 elif z <= -2.4e-90: tmp = t_1 elif z <= -1.8e-197: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 3.8e-97: tmp = t_1 elif z <= 2.6e+76: tmp = (x - y) / ((z - t) * 0.016666666666666666) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))) t_2 = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))) tmp = 0.0 if (z <= -7e+81) tmp = t_2; elseif (z <= -2.4e-90) tmp = t_1; elseif (z <= -1.8e-197) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 3.8e-97) tmp = t_1; elseif (z <= 2.6e+76) tmp = Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * ((x - y) / t)); t_2 = (a * 120.0) + (60.0 * (x / z)); tmp = 0.0; if (z <= -7e+81) tmp = t_2; elseif (z <= -2.4e-90) tmp = t_1; elseif (z <= -1.8e-197) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 3.8e-97) tmp = t_1; elseif (z <= 2.6e+76) tmp = (x - y) / ((z - t) * 0.016666666666666666); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+81], t$95$2, If[LessEqual[z, -2.4e-90], t$95$1, If[LessEqual[z, -1.8e-197], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-97], t$95$1, If[LessEqual[z, 2.6e+76], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
t_2 := a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+81}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-197}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+76}:\\
\;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.0000000000000001e81 or 2.5999999999999999e76 < z Initial program 98.7%
Taylor expanded in x around inf 82.4%
Taylor expanded in z around inf 81.1%
if -7.0000000000000001e81 < z < -2.4000000000000002e-90 or -1.7999999999999999e-197 < z < 3.8000000000000001e-97Initial program 98.9%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in z around 0 92.3%
if -2.4000000000000002e-90 < z < -1.7999999999999999e-197Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 87.5%
if 3.8000000000000001e-97 < z < 2.5999999999999999e76Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.4%
associate-*r/71.2%
*-rgt-identity71.2%
times-frac71.4%
/-rgt-identity71.4%
Simplified71.4%
clear-num71.3%
inv-pow71.3%
div-inv71.3%
metadata-eval71.3%
Applied egg-rr71.3%
unpow-171.3%
Simplified71.3%
associate-*l/71.4%
*-un-lft-identity71.4%
Applied egg-rr71.4%
Final simplification85.0%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -92.0)
(and (not (<= a 1.15e-13)) (or (<= a 2.25e+135) (not (<= a 5e+164)))))
(* 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 <= -92.0) || (!(a <= 1.15e-13) && ((a <= 2.25e+135) || !(a <= 5e+164)))) {
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 <= (-92.0d0)) .or. (.not. (a <= 1.15d-13)) .and. (a <= 2.25d+135) .or. (.not. (a <= 5d+164))) 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 <= -92.0) || (!(a <= 1.15e-13) && ((a <= 2.25e+135) || !(a <= 5e+164)))) {
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 <= -92.0) or (not (a <= 1.15e-13) and ((a <= 2.25e+135) or not (a <= 5e+164))): 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 <= -92.0) || (!(a <= 1.15e-13) && ((a <= 2.25e+135) || !(a <= 5e+164)))) 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 <= -92.0) || (~((a <= 1.15e-13)) && ((a <= 2.25e+135) || ~((a <= 5e+164))))) 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, -92.0], And[N[Not[LessEqual[a, 1.15e-13]], $MachinePrecision], Or[LessEqual[a, 2.25e+135], N[Not[LessEqual[a, 5e+164]], $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 -92 \lor \neg \left(a \leq 1.15 \cdot 10^{-13}\right) \land \left(a \leq 2.25 \cdot 10^{+135} \lor \neg \left(a \leq 5 \cdot 10^{+164}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -92 or 1.1499999999999999e-13 < a < 2.25000000000000004e135 or 4.9999999999999995e164 < a Initial program 98.3%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 71.7%
if -92 < a < 1.1499999999999999e-13 or 2.25000000000000004e135 < a < 4.9999999999999995e164Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.8%
Final simplification77.3%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -20.0)
(not
(or (<= a 2.9e-13) (and (not (<= a 2.25e+135)) (<= a 1.95e+164)))))
(* a 120.0)
(* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -20.0) || !((a <= 2.9e-13) || (!(a <= 2.25e+135) && (a <= 1.95e+164)))) {
tmp = a * 120.0;
} else {
tmp = (x - 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 ((a <= (-20.0d0)) .or. (.not. (a <= 2.9d-13) .or. (.not. (a <= 2.25d+135)) .and. (a <= 1.95d+164))) then
tmp = a * 120.0d0
else
tmp = (x - 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 ((a <= -20.0) || !((a <= 2.9e-13) || (!(a <= 2.25e+135) && (a <= 1.95e+164)))) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -20.0) or not ((a <= 2.9e-13) or (not (a <= 2.25e+135) and (a <= 1.95e+164))): tmp = a * 120.0 else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -20.0) || !((a <= 2.9e-13) || (!(a <= 2.25e+135) && (a <= 1.95e+164)))) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -20.0) || ~(((a <= 2.9e-13) || (~((a <= 2.25e+135)) && (a <= 1.95e+164))))) tmp = a * 120.0; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -20.0], N[Not[Or[LessEqual[a, 2.9e-13], And[N[Not[LessEqual[a, 2.25e+135]], $MachinePrecision], LessEqual[a, 1.95e+164]]]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -20 \lor \neg \left(a \leq 2.9 \cdot 10^{-13} \lor \neg \left(a \leq 2.25 \cdot 10^{+135}\right) \land a \leq 1.95 \cdot 10^{+164}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if a < -20 or 2.8999999999999998e-13 < a < 2.25000000000000004e135 or 1.94999999999999993e164 < a Initial program 98.3%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 71.7%
if -20 < a < 2.8999999999999998e-13 or 2.25000000000000004e135 < a < 1.94999999999999993e164Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.8%
associate-*r/82.8%
*-rgt-identity82.8%
times-frac82.8%
/-rgt-identity82.8%
Simplified82.8%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= a -7.4e-121)
(* a 120.0)
(if (<= a -1.65e-289)
t_1
(if (<= a 1.25e-235)
(* 60.0 (/ y (- t z)))
(if (<= a 2.3e-41) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (a <= -7.4e-121) {
tmp = a * 120.0;
} else if (a <= -1.65e-289) {
tmp = t_1;
} else if (a <= 1.25e-235) {
tmp = 60.0 * (y / (t - z));
} else if (a <= 2.3e-41) {
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 * (x / (z - t))
if (a <= (-7.4d-121)) then
tmp = a * 120.0d0
else if (a <= (-1.65d-289)) then
tmp = t_1
else if (a <= 1.25d-235) then
tmp = 60.0d0 * (y / (t - z))
else if (a <= 2.3d-41) 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 * (x / (z - t));
double tmp;
if (a <= -7.4e-121) {
tmp = a * 120.0;
} else if (a <= -1.65e-289) {
tmp = t_1;
} else if (a <= 1.25e-235) {
tmp = 60.0 * (y / (t - z));
} else if (a <= 2.3e-41) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if a <= -7.4e-121: tmp = a * 120.0 elif a <= -1.65e-289: tmp = t_1 elif a <= 1.25e-235: tmp = 60.0 * (y / (t - z)) elif a <= 2.3e-41: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (a <= -7.4e-121) tmp = Float64(a * 120.0); elseif (a <= -1.65e-289) tmp = t_1; elseif (a <= 1.25e-235) tmp = Float64(60.0 * Float64(y / Float64(t - z))); elseif (a <= 2.3e-41) 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 * (x / (z - t)); tmp = 0.0; if (a <= -7.4e-121) tmp = a * 120.0; elseif (a <= -1.65e-289) tmp = t_1; elseif (a <= 1.25e-235) tmp = 60.0 * (y / (t - z)); elseif (a <= 2.3e-41) 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[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.4e-121], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.65e-289], t$95$1, If[LessEqual[a, 1.25e-235], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e-41], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;a \leq -7.4 \cdot 10^{-121}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.65 \cdot 10^{-289}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-235}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.4000000000000004e-121 or 2.3000000000000001e-41 < a Initial program 98.6%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 63.6%
if -7.4000000000000004e-121 < a < -1.64999999999999999e-289 or 1.2499999999999999e-235 < a < 2.3000000000000001e-41Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 53.1%
if -1.64999999999999999e-289 < a < 1.2499999999999999e-235Initial program 99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 72.0%
Final simplification61.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-58) (not (<= (* a 120.0) 5e-39))) (+ (* 60.0 (/ y (- t z))) (* a 120.0)) (/ (- x y) (* (- z t) 0.016666666666666666))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-58) || !((a * 120.0) <= 5e-39)) {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
} else {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
}
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) <= (-2d-58)) .or. (.not. ((a * 120.0d0) <= 5d-39))) then
tmp = (60.0d0 * (y / (t - z))) + (a * 120.0d0)
else
tmp = (x - y) / ((z - t) * 0.016666666666666666d0)
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) <= -2e-58) || !((a * 120.0) <= 5e-39)) {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
} else {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-58) or not ((a * 120.0) <= 5e-39): tmp = (60.0 * (y / (t - z))) + (a * 120.0) else: tmp = (x - y) / ((z - t) * 0.016666666666666666) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-58) || !(Float64(a * 120.0) <= 5e-39)) tmp = Float64(Float64(60.0 * Float64(y / Float64(t - z))) + Float64(a * 120.0)); else tmp = Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e-58) || ~(((a * 120.0) <= 5e-39))) tmp = (60.0 * (y / (t - z))) + (a * 120.0); else tmp = (x - y) / ((z - t) * 0.016666666666666666); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-58], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-39]], $MachinePrecision]], N[(N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-58} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-39}\right):\\
\;\;\;\;60 \cdot \frac{y}{t - z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.0000000000000001e-58 or 4.9999999999999998e-39 < (*.f64 a #s(literal 120 binary64)) Initial program 98.6%
*-commutative98.6%
associate-/l*99.2%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
neg-sub099.2%
associate-+l-99.2%
sub0-neg99.2%
distribute-frac-neg299.2%
distribute-neg-frac99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 82.9%
if -2.0000000000000001e-58 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999998e-39Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 84.5%
associate-*r/84.6%
*-rgt-identity84.6%
times-frac84.6%
/-rgt-identity84.6%
Simplified84.6%
clear-num84.5%
inv-pow84.5%
div-inv84.5%
metadata-eval84.5%
Applied egg-rr84.5%
unpow-184.5%
Simplified84.5%
associate-*l/84.6%
*-un-lft-identity84.6%
Applied egg-rr84.6%
Final simplification83.6%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -10000.0)
(* a 120.0)
(if (<= (* a 120.0) 1e-41)
(* (- x y) (/ 60.0 (- z t)))
(+ (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -10000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-41) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (-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 * 120.0d0) <= (-10000.0d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-41) then
tmp = (x - y) * (60.0d0 / (z - t))
else
tmp = (a * 120.0d0) + ((-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 * 120.0) <= -10000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-41) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -10000.0: tmp = a * 120.0 elif (a * 120.0) <= 1e-41: tmp = (x - y) * (60.0 / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -10000.0) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-41) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -10000.0) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-41) tmp = (x - y) * (60.0 / (z - t)); else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -10000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-41], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -10000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-41}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e4Initial program 98.5%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in z around inf 71.1%
if -1e4 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000001e-41Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.2%
associate-*r/82.3%
*-rgt-identity82.3%
times-frac82.2%
/-rgt-identity82.2%
Simplified82.2%
if 1.00000000000000001e-41 < (*.f64 a #s(literal 120 binary64)) Initial program 98.3%
Taylor expanded in x around inf 86.2%
Taylor expanded in z around 0 70.8%
Final simplification76.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -10000.0)
(* a 120.0)
(if (<= (* a 120.0) 1e-41)
(/ 60.0 (/ (- z t) (- x y)))
(+ (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -10000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-41) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + (-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 * 120.0d0) <= (-10000.0d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-41) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = (a * 120.0d0) + ((-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 * 120.0) <= -10000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-41) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -10000.0: tmp = a * 120.0 elif (a * 120.0) <= 1e-41: tmp = 60.0 / ((z - t) / (x - y)) else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -10000.0) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-41) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -10000.0) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-41) tmp = 60.0 / ((z - t) / (x - y)); else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -10000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-41], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -10000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-41}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e4Initial program 98.5%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in z around inf 71.1%
if -1e4 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000001e-41Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.2%
associate-*r/82.3%
*-rgt-identity82.3%
times-frac82.2%
/-rgt-identity82.2%
associate-/r/82.3%
Simplified82.3%
if 1.00000000000000001e-41 < (*.f64 a #s(literal 120 binary64)) Initial program 98.3%
Taylor expanded in x around inf 86.2%
Taylor expanded in z around 0 70.8%
Final simplification76.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -6.5e-60)
(* a 120.0)
(if (<= a -1.15e-138)
(* (- x y) (/ 60.0 z))
(if (<= a 1.5e-39) (* (- x y) (/ -60.0 t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-60) {
tmp = a * 120.0;
} else if (a <= -1.15e-138) {
tmp = (x - y) * (60.0 / z);
} else if (a <= 1.5e-39) {
tmp = (x - y) * (-60.0 / t);
} 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 <= (-6.5d-60)) then
tmp = a * 120.0d0
else if (a <= (-1.15d-138)) then
tmp = (x - y) * (60.0d0 / z)
else if (a <= 1.5d-39) then
tmp = (x - y) * ((-60.0d0) / t)
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 <= -6.5e-60) {
tmp = a * 120.0;
} else if (a <= -1.15e-138) {
tmp = (x - y) * (60.0 / z);
} else if (a <= 1.5e-39) {
tmp = (x - y) * (-60.0 / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.5e-60: tmp = a * 120.0 elif a <= -1.15e-138: tmp = (x - y) * (60.0 / z) elif a <= 1.5e-39: tmp = (x - y) * (-60.0 / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e-60) tmp = Float64(a * 120.0); elseif (a <= -1.15e-138) tmp = Float64(Float64(x - y) * Float64(60.0 / z)); elseif (a <= 1.5e-39) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.5e-60) tmp = a * 120.0; elseif (a <= -1.15e-138) tmp = (x - y) * (60.0 / z); elseif (a <= 1.5e-39) tmp = (x - y) * (-60.0 / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e-60], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.15e-138], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e-39], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-60}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-138}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-39}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.49999999999999995e-60 or 1.50000000000000014e-39 < a Initial program 98.6%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 65.4%
if -6.49999999999999995e-60 < a < -1.14999999999999995e-138Initial program 99.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 74.0%
associate-*r/73.8%
*-rgt-identity73.8%
times-frac74.0%
/-rgt-identity74.0%
Simplified74.0%
Taylor expanded in z around inf 65.1%
if -1.14999999999999995e-138 < a < 1.50000000000000014e-39Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 85.9%
associate-*r/85.9%
*-rgt-identity85.9%
times-frac85.9%
/-rgt-identity85.9%
Simplified85.9%
Taylor expanded in z around 0 52.9%
Final simplification60.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3e+133) (not (<= y 5e+47))) (+ (* 60.0 (/ y (- t z))) (* a 120.0)) (+ (* a 120.0) (/ (* x 60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3e+133) || !(y <= 5e+47)) {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
} 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 <= (-3d+133)) .or. (.not. (y <= 5d+47))) then
tmp = (60.0d0 * (y / (t - z))) + (a * 120.0d0)
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 <= -3e+133) || !(y <= 5e+47)) {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3e+133) or not (y <= 5e+47): tmp = (60.0 * (y / (t - z))) + (a * 120.0) else: tmp = (a * 120.0) + ((x * 60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3e+133) || !(y <= 5e+47)) tmp = Float64(Float64(60.0 * Float64(y / Float64(t - z))) + Float64(a * 120.0)); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3e+133) || ~((y <= 5e+47))) tmp = (60.0 * (y / (t - z))) + (a * 120.0); 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, -3e+133], N[Not[LessEqual[y, 5e+47]], $MachinePrecision]], N[(N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+133} \lor \neg \left(y \leq 5 \cdot 10^{+47}\right):\\
\;\;\;\;60 \cdot \frac{y}{t - z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\end{array}
\end{array}
if y < -3.00000000000000007e133 or 5.00000000000000022e47 < y Initial program 98.0%
*-commutative98.0%
associate-/l*98.7%
fma-define98.7%
sub-neg98.7%
+-commutative98.7%
neg-sub098.7%
associate-+l-98.7%
sub0-neg98.7%
distribute-frac-neg298.7%
distribute-neg-frac98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in x around 0 89.0%
if -3.00000000000000007e133 < y < 5.00000000000000022e47Initial program 99.8%
Taylor expanded in x around inf 93.0%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8e-121) (not (<= a 3e-32))) (* a 120.0) (* 60.0 (/ x (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8e-121) || !(a <= 3e-32)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (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 <= (-8d-121)) .or. (.not. (a <= 3d-32))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / (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 <= -8e-121) || !(a <= 3e-32)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8e-121) or not (a <= 3e-32): tmp = a * 120.0 else: tmp = 60.0 * (x / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8e-121) || !(a <= 3e-32)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8e-121) || ~((a <= 3e-32))) tmp = a * 120.0; else tmp = 60.0 * (x / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8e-121], N[Not[LessEqual[a, 3e-32]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-121} \lor \neg \left(a \leq 3 \cdot 10^{-32}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if a < -7.9999999999999998e-121 or 3e-32 < a Initial program 98.6%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 63.6%
if -7.9999999999999998e-121 < a < 3e-32Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 47.6%
Final simplification57.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.9e+58) (not (<= x 6.4e+201))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.9e+58) || !(x <= 6.4e+201)) {
tmp = -60.0 * (x / t);
} 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 ((x <= (-4.9d+58)) .or. (.not. (x <= 6.4d+201))) then
tmp = (-60.0d0) * (x / t)
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 ((x <= -4.9e+58) || !(x <= 6.4e+201)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.9e+58) or not (x <= 6.4e+201): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.9e+58) || !(x <= 6.4e+201)) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.9e+58) || ~((x <= 6.4e+201))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.9e+58], N[Not[LessEqual[x, 6.4e+201]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+58} \lor \neg \left(x \leq 6.4 \cdot 10^{+201}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -4.90000000000000018e58 or 6.3999999999999998e201 < x Initial program 98.6%
*-commutative98.6%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 64.2%
associate-*r/63.1%
Simplified63.1%
Taylor expanded in t around inf 36.6%
if -4.90000000000000018e58 < x < 6.3999999999999998e201Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 54.5%
Final simplification48.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.5e+194) (not (<= x 3.9e+202))) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.5e+194) || !(x <= 3.9e+202)) {
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 ((x <= (-5.5d+194)) .or. (.not. (x <= 3.9d+202))) 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 ((x <= -5.5e+194) || !(x <= 3.9e+202)) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5.5e+194) or not (x <= 3.9e+202): tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5.5e+194) || !(x <= 3.9e+202)) 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 ((x <= -5.5e+194) || ~((x <= 3.9e+202))) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5.5e+194], N[Not[LessEqual[x, 3.9e+202]], $MachinePrecision]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+194} \lor \neg \left(x \leq 3.9 \cdot 10^{+202}\right):\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -5.4999999999999999e194 or 3.89999999999999983e202 < x Initial program 98.1%
*-commutative98.1%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 70.7%
associate-*r/69.1%
Simplified69.1%
Taylor expanded in t around 0 51.3%
if -5.4999999999999999e194 < x < 3.89999999999999983e202Initial program 99.3%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 51.6%
Final simplification51.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.8e+228) (not (<= y 4.2e+100))) (* 60.0 (/ y t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+228) || !(y <= 4.2e+100)) {
tmp = 60.0 * (y / t);
} 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 <= (-5.8d+228)) .or. (.not. (y <= 4.2d+100))) then
tmp = 60.0d0 * (y / t)
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 <= -5.8e+228) || !(y <= 4.2e+100)) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.8e+228) or not (y <= 4.2e+100): tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.8e+228) || !(y <= 4.2e+100)) tmp = Float64(60.0 * Float64(y / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.8e+228) || ~((y <= 4.2e+100))) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+228], N[Not[LessEqual[y, 4.2e+100]], $MachinePrecision]], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+228} \lor \neg \left(y \leq 4.2 \cdot 10^{+100}\right):\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -5.80000000000000003e228 or 4.1999999999999997e100 < y Initial program 98.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in a around 0 80.1%
associate-*r/80.1%
*-rgt-identity80.1%
times-frac79.9%
/-rgt-identity79.9%
Simplified79.9%
Taylor expanded in z around 0 53.0%
Taylor expanded in x around 0 47.7%
if -5.80000000000000003e228 < y < 4.1999999999999997e100Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 53.9%
Final simplification52.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.35e+229) (/ (* y 60.0) t) (if (<= y 3.8e+100) (* a 120.0) (* 60.0 (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.35e+229) {
tmp = (y * 60.0) / t;
} else if (y <= 3.8e+100) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / 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.35d+229)) then
tmp = (y * 60.0d0) / t
else if (y <= 3.8d+100) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / 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.35e+229) {
tmp = (y * 60.0) / t;
} else if (y <= 3.8e+100) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.35e+229: tmp = (y * 60.0) / t elif y <= 3.8e+100: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.35e+229) tmp = Float64(Float64(y * 60.0) / t); elseif (y <= 3.8e+100) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.35e+229) tmp = (y * 60.0) / t; elseif (y <= 3.8e+100) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.35e+229], N[(N[(y * 60.0), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 3.8e+100], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+229}:\\
\;\;\;\;\frac{y \cdot 60}{t}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+100}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < -2.35e229Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.9%
associate-*r/85.3%
*-rgt-identity85.3%
times-frac84.9%
/-rgt-identity84.9%
Simplified84.9%
Taylor expanded in z around 0 74.1%
associate-*l/74.3%
Applied egg-rr74.3%
Taylor expanded in x around 0 67.5%
associate-*r/67.7%
Simplified67.7%
if -2.35e229 < y < 3.79999999999999963e100Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 53.9%
if 3.79999999999999963e100 < y Initial program 97.8%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in a around 0 78.7%
associate-*r/78.7%
*-rgt-identity78.7%
times-frac78.5%
/-rgt-identity78.5%
Simplified78.5%
Taylor expanded in z around 0 47.0%
Taylor expanded in x around 0 42.1%
Final simplification52.2%
(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.0%
associate-/l*99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (x y z t a) :precision binary64 (if (<= y 2.2e+137) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.2e+137) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / 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 <= 2.2d+137) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / 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 <= 2.2e+137) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 2.2e+137: tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.2e+137) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 2.2e+137) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.2e+137], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.2 \cdot 10^{+137}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < 2.20000000000000015e137Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 50.1%
if 2.20000000000000015e137 < y Initial program 97.6%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in a around 0 81.6%
associate-*r/81.6%
*-rgt-identity81.6%
times-frac81.4%
/-rgt-identity81.4%
Simplified81.4%
clear-num81.4%
inv-pow81.4%
div-inv81.4%
metadata-eval81.4%
Applied egg-rr81.4%
unpow-181.4%
Simplified81.4%
Taylor expanded in z around inf 46.9%
Taylor expanded in x around 0 40.4%
Final simplification48.3%
(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.0%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in z around inf 44.5%
Final simplification44.5%
(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 2024076
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))