
(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 (- (* a 120.0) (/ 60.0 (/ (- t z) (- x y)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - (60.0 / ((t - z) / (x - y)));
}
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 / ((t - z) / (x - y)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - (60.0 / ((t - z) / (x - y)));
}
def code(x, y, z, t, a): return (a * 120.0) - (60.0 / ((t - z) / (x - y)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) - Float64(60.0 / Float64(Float64(t - z) / Float64(x - y)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) - (60.0 / ((t - z) / (x - y))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 / N[(N[(t - z), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 - \frac{60}{\frac{t - z}{x - y}}
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x) t))))
(if (<= x -8.2e+169)
t_1
(if (<= x 5.5e+161)
(* a 120.0)
(if (<= x 1.5e+204)
(* 60.0 (/ x z))
(if (<= x 1.3e+273) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (-x / t);
double tmp;
if (x <= -8.2e+169) {
tmp = t_1;
} else if (x <= 5.5e+161) {
tmp = a * 120.0;
} else if (x <= 1.5e+204) {
tmp = 60.0 * (x / z);
} else if (x <= 1.3e+273) {
tmp = a * 120.0;
} 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 = 60.0d0 * (-x / t)
if (x <= (-8.2d+169)) then
tmp = t_1
else if (x <= 5.5d+161) then
tmp = a * 120.0d0
else if (x <= 1.5d+204) then
tmp = 60.0d0 * (x / z)
else if (x <= 1.3d+273) then
tmp = a * 120.0d0
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 = 60.0 * (-x / t);
double tmp;
if (x <= -8.2e+169) {
tmp = t_1;
} else if (x <= 5.5e+161) {
tmp = a * 120.0;
} else if (x <= 1.5e+204) {
tmp = 60.0 * (x / z);
} else if (x <= 1.3e+273) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (-x / t) tmp = 0 if x <= -8.2e+169: tmp = t_1 elif x <= 5.5e+161: tmp = a * 120.0 elif x <= 1.5e+204: tmp = 60.0 * (x / z) elif x <= 1.3e+273: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(-x) / t)) tmp = 0.0 if (x <= -8.2e+169) tmp = t_1; elseif (x <= 5.5e+161) tmp = Float64(a * 120.0); elseif (x <= 1.5e+204) tmp = Float64(60.0 * Float64(x / z)); elseif (x <= 1.3e+273) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (-x / t); tmp = 0.0; if (x <= -8.2e+169) tmp = t_1; elseif (x <= 5.5e+161) tmp = a * 120.0; elseif (x <= 1.5e+204) tmp = 60.0 * (x / z); elseif (x <= 1.3e+273) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[((-x) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e+169], t$95$1, If[LessEqual[x, 5.5e+161], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 1.5e+204], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+273], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{-x}{t}\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+161}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+204}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+273}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.2000000000000006e169 or 1.29999999999999997e273 < x Initial program 97.7%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 82.0%
Taylor expanded in x around inf 80.9%
Taylor expanded in z around 0 54.2%
associate-*r/54.2%
neg-mul-154.2%
Simplified54.2%
if -8.2000000000000006e169 < x < 5.5000000000000005e161 or 1.49999999999999991e204 < x < 1.29999999999999997e273Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.0%
if 5.5000000000000005e161 < x < 1.49999999999999991e204Initial program 100.0%
associate-/l*99.6%
Simplified99.6%
clear-num99.3%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 85.9%
Taylor expanded in x around inf 85.4%
Taylor expanded in z around inf 86.1%
Final simplification59.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e-58) (not (<= (- z t) 20000000000.0))) (+ (/ 60.0 (/ (- z t) x)) (* a 120.0)) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e-58) || !((z - t) <= 20000000000.0)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = 60.0 / ((z - t) / (x - 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 (((z - t) <= (-5d-58)) .or. (.not. ((z - t) <= 20000000000.0d0))) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else
tmp = 60.0d0 / ((z - t) / (x - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e-58) || !((z - t) <= 20000000000.0)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e-58) or not ((z - t) <= 20000000000.0): tmp = (60.0 / ((z - t) / x)) + (a * 120.0) else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -5e-58) || !(Float64(z - t) <= 20000000000.0)) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -5e-58) || ~(((z - t) <= 20000000000.0))) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -5e-58], N[Not[LessEqual[N[(z - t), $MachinePrecision], 20000000000.0]], $MachinePrecision]], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{-58} \lor \neg \left(z - t \leq 20000000000\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999977e-58 or 2e10 < (-.f64 z t) Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 88.6%
if -4.99999999999999977e-58 < (-.f64 z t) < 2e10Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 90.5%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr90.6%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e-58) (not (<= (- z t) 5e+21))) (+ (* 60.0 (/ x (- z t))) (* a 120.0)) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e-58) || !((z - t) <= 5e+21)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = 60.0 / ((z - t) / (x - 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 (((z - t) <= (-5d-58)) .or. (.not. ((z - t) <= 5d+21))) then
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
else
tmp = 60.0d0 / ((z - t) / (x - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e-58) || !((z - t) <= 5e+21)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e-58) or not ((z - t) <= 5e+21): tmp = (60.0 * (x / (z - t))) + (a * 120.0) else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -5e-58) || !(Float64(z - t) <= 5e+21)) tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -5e-58) || ~(((z - t) <= 5e+21))) tmp = (60.0 * (x / (z - t))) + (a * 120.0); else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -5e-58], N[Not[LessEqual[N[(z - t), $MachinePrecision], 5e+21]], $MachinePrecision]], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{-58} \lor \neg \left(z - t \leq 5 \cdot 10^{+21}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999977e-58 or 5e21 < (-.f64 z t) Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.5%
if -4.99999999999999977e-58 < (-.f64 z t) < 5e21Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 90.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr90.8%
Final simplification89.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* 60.0 (/ x z)) (* a 120.0))))
(if (<= z -3.9e-17)
t_1
(if (<= z 1.4e-291)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= z 1.05e+22) (- (* a 120.0) (/ 60.0 (/ t x))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x / z)) + (a * 120.0);
double tmp;
if (z <= -3.9e-17) {
tmp = t_1;
} else if (z <= 1.4e-291) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 1.05e+22) {
tmp = (a * 120.0) - (60.0 / (t / x));
} 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 = (60.0d0 * (x / z)) + (a * 120.0d0)
if (z <= (-3.9d-17)) then
tmp = t_1
else if (z <= 1.4d-291) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (z <= 1.05d+22) then
tmp = (a * 120.0d0) - (60.0d0 / (t / x))
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 = (60.0 * (x / z)) + (a * 120.0);
double tmp;
if (z <= -3.9e-17) {
tmp = t_1;
} else if (z <= 1.4e-291) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 1.05e+22) {
tmp = (a * 120.0) - (60.0 / (t / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x / z)) + (a * 120.0) tmp = 0 if z <= -3.9e-17: tmp = t_1 elif z <= 1.4e-291: tmp = 60.0 / ((z - t) / (x - y)) elif z <= 1.05e+22: tmp = (a * 120.0) - (60.0 / (t / x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x / z)) + Float64(a * 120.0)) tmp = 0.0 if (z <= -3.9e-17) tmp = t_1; elseif (z <= 1.4e-291) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (z <= 1.05e+22) tmp = Float64(Float64(a * 120.0) - Float64(60.0 / Float64(t / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x / z)) + (a * 120.0); tmp = 0.0; if (z <= -3.9e-17) tmp = t_1; elseif (z <= 1.4e-291) tmp = 60.0 / ((z - t) / (x - y)); elseif (z <= 1.05e+22) tmp = (a * 120.0) - (60.0 / (t / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.9e-17], t$95$1, If[LessEqual[z, 1.4e-291], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+22], N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z} + a \cdot 120\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-291}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+22}:\\
\;\;\;\;a \cdot 120 - \frac{60}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.89999999999999989e-17 or 1.0499999999999999e22 < z Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around inf 95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in x around inf 86.7%
associate-/r*78.8%
Simplified78.8%
Taylor expanded in z around inf 81.1%
if -3.89999999999999989e-17 < z < 1.4e-291Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 78.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr78.8%
if 1.4e-291 < z < 1.0499999999999999e22Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 80.0%
Taylor expanded in z around 0 78.3%
neg-mul-178.3%
Simplified78.3%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* 60.0 (/ x z)) (* a 120.0))))
(if (<= z -3.8e-17)
t_1
(if (<= z 1.2e-295)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= z 1.02e+21) (+ (* a 120.0) (* -60.0 (/ x t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x / z)) + (a * 120.0);
double tmp;
if (z <= -3.8e-17) {
tmp = t_1;
} else if (z <= 1.2e-295) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 1.02e+21) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} 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 = (60.0d0 * (x / z)) + (a * 120.0d0)
if (z <= (-3.8d-17)) then
tmp = t_1
else if (z <= 1.2d-295) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (z <= 1.02d+21) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
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 = (60.0 * (x / z)) + (a * 120.0);
double tmp;
if (z <= -3.8e-17) {
tmp = t_1;
} else if (z <= 1.2e-295) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 1.02e+21) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x / z)) + (a * 120.0) tmp = 0 if z <= -3.8e-17: tmp = t_1 elif z <= 1.2e-295: tmp = 60.0 / ((z - t) / (x - y)) elif z <= 1.02e+21: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x / z)) + Float64(a * 120.0)) tmp = 0.0 if (z <= -3.8e-17) tmp = t_1; elseif (z <= 1.2e-295) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (z <= 1.02e+21) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x / z)) + (a * 120.0); tmp = 0.0; if (z <= -3.8e-17) tmp = t_1; elseif (z <= 1.2e-295) tmp = 60.0 / ((z - t) / (x - y)); elseif (z <= 1.02e+21) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e-17], t$95$1, If[LessEqual[z, 1.2e-295], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+21], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z} + a \cdot 120\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-295}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+21}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.8000000000000001e-17 or 1.02e21 < z Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around inf 95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in x around inf 86.7%
associate-/r*78.8%
Simplified78.8%
Taylor expanded in z around inf 81.1%
if -3.8000000000000001e-17 < z < 1.1999999999999999e-295Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 78.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr78.8%
if 1.1999999999999999e-295 < z < 1.02e21Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around inf 88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in x around inf 73.6%
associate-/r*67.7%
Simplified67.7%
Taylor expanded in t around inf 78.2%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* 60.0 (/ x z)) (* a 120.0))))
(if (<= z -5.8e-17)
t_1
(if (<= z 1.15e-293)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 1.02e+27) (+ (* a 120.0) (* -60.0 (/ x t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x / z)) + (a * 120.0);
double tmp;
if (z <= -5.8e-17) {
tmp = t_1;
} else if (z <= 1.15e-293) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 1.02e+27) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} 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 = (60.0d0 * (x / z)) + (a * 120.0d0)
if (z <= (-5.8d-17)) then
tmp = t_1
else if (z <= 1.15d-293) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 1.02d+27) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
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 = (60.0 * (x / z)) + (a * 120.0);
double tmp;
if (z <= -5.8e-17) {
tmp = t_1;
} else if (z <= 1.15e-293) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 1.02e+27) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x / z)) + (a * 120.0) tmp = 0 if z <= -5.8e-17: tmp = t_1 elif z <= 1.15e-293: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 1.02e+27: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x / z)) + Float64(a * 120.0)) tmp = 0.0 if (z <= -5.8e-17) tmp = t_1; elseif (z <= 1.15e-293) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 1.02e+27) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x / z)) + (a * 120.0); tmp = 0.0; if (z <= -5.8e-17) tmp = t_1; elseif (z <= 1.15e-293) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 1.02e+27) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e-17], t$95$1, If[LessEqual[z, 1.15e-293], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z} + a \cdot 120\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-293}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+27}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.8000000000000006e-17 or 1.0199999999999999e27 < z Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around inf 95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in x around inf 86.7%
associate-/r*78.8%
Simplified78.8%
Taylor expanded in z around inf 81.1%
if -5.8000000000000006e-17 < z < 1.14999999999999998e-293Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 78.8%
if 1.14999999999999998e-293 < z < 1.0199999999999999e27Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around inf 88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in x around inf 73.6%
associate-/r*67.7%
Simplified67.7%
Taylor expanded in t around inf 78.2%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e+146) (not (<= (- z t) 1e+106))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+146) || !((z - t) <= 1e+106)) {
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 (((z - t) <= (-5d+146)) .or. (.not. ((z - t) <= 1d+106))) 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 (((z - t) <= -5e+146) || !((z - t) <= 1e+106)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e+146) or not ((z - t) <= 1e+106): 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 ((Float64(z - t) <= -5e+146) || !(Float64(z - t) <= 1e+106)) 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 (((z - t) <= -5e+146) || ~(((z - t) <= 1e+106))) 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[N[(z - t), $MachinePrecision], -5e+146], N[Not[LessEqual[N[(z - t), $MachinePrecision], 1e+106]], $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}\;z - t \leq -5 \cdot 10^{+146} \lor \neg \left(z - t \leq 10^{+106}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.9999999999999999e146 or 1.00000000000000009e106 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 74.1%
if -4.9999999999999999e146 < (-.f64 z t) < 1.00000000000000009e106Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 76.9%
Final simplification75.5%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.2e+24)
(+ (/ 60.0 (/ (- z t) x)) (* a 120.0))
(if (<= x 48000000.0)
(+ (/ 60.0 (/ (- t z) y)) (* a 120.0))
(+ (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.2e+24) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else if (x <= 48000000.0) {
tmp = (60.0 / ((t - z) / y)) + (a * 120.0);
} else {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4.2d+24)) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else if (x <= 48000000.0d0) then
tmp = (60.0d0 / ((t - z) / y)) + (a * 120.0d0)
else
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.2e+24) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else if (x <= 48000000.0) {
tmp = (60.0 / ((t - z) / y)) + (a * 120.0);
} else {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.2e+24: tmp = (60.0 / ((z - t) / x)) + (a * 120.0) elif x <= 48000000.0: tmp = (60.0 / ((t - z) / y)) + (a * 120.0) else: tmp = (60.0 * (x / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.2e+24) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); elseif (x <= 48000000.0) tmp = Float64(Float64(60.0 / Float64(Float64(t - z) / y)) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.2e+24) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); elseif (x <= 48000000.0) tmp = (60.0 / ((t - z) / y)) + (a * 120.0); else tmp = (60.0 * (x / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.2e+24], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 48000000.0], N[(N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+24}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{elif}\;x \leq 48000000:\\
\;\;\;\;\frac{60}{\frac{t - z}{y}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -4.2000000000000003e24Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 94.2%
if -4.2000000000000003e24 < x < 4.8e7Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 94.6%
neg-mul-194.6%
Simplified94.6%
if 4.8e7 < x Initial program 98.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.8%
Final simplification93.2%
(FPCore (x y z t a)
:precision binary64
(if (<= x -2.15e+24)
(+ (/ 60.0 (/ (- z t) x)) (* a 120.0))
(if (<= x 20000000.0)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(+ (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.15e+24) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else if (x <= 20000000.0) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-2.15d+24)) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else if (x <= 20000000.0d0) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.15e+24) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else if (x <= 20000000.0) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.15e+24: tmp = (60.0 / ((z - t) / x)) + (a * 120.0) elif x <= 20000000.0: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = (60.0 * (x / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.15e+24) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); elseif (x <= 20000000.0) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.15e+24) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); elseif (x <= 20000000.0) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = (60.0 * (x / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.15e+24], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 20000000.0], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.15 \cdot 10^{+24}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{elif}\;x \leq 20000000:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -2.14999999999999994e24Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 94.2%
if -2.14999999999999994e24 < x < 2e7Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 94.7%
associate-*r/94.6%
Simplified94.6%
if 2e7 < x Initial program 98.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.8%
Final simplification93.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -8e+169) (and (not (<= x 8.5e+161)) (<= x 7.2e+203))) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -8e+169) || (!(x <= 8.5e+161) && (x <= 7.2e+203))) {
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 <= (-8d+169)) .or. (.not. (x <= 8.5d+161)) .and. (x <= 7.2d+203)) 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 <= -8e+169) || (!(x <= 8.5e+161) && (x <= 7.2e+203))) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -8e+169) or (not (x <= 8.5e+161) and (x <= 7.2e+203)): tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -8e+169) || (!(x <= 8.5e+161) && (x <= 7.2e+203))) 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 <= -8e+169) || (~((x <= 8.5e+161)) && (x <= 7.2e+203))) 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, -8e+169], And[N[Not[LessEqual[x, 8.5e+161]], $MachinePrecision], LessEqual[x, 7.2e+203]]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+169} \lor \neg \left(x \leq 8.5 \cdot 10^{+161}\right) \land x \leq 7.2 \cdot 10^{+203}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -7.99999999999999947e169 or 8.50000000000000007e161 < x < 7.19999999999999964e203Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.7%
Taylor expanded in x around inf 81.6%
Taylor expanded in z around inf 49.6%
if -7.99999999999999947e169 < x < 8.50000000000000007e161 or 7.19999999999999964e203 < x Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.3%
Final simplification56.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.3e+169) (not (<= x 6e+29))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.3e+169) || !(x <= 6e+29)) {
tmp = 60.0 * (x / (z - 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.3d+169)) .or. (.not. (x <= 6d+29))) then
tmp = 60.0d0 * (x / (z - 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.3e+169) || !(x <= 6e+29)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.3e+169) or not (x <= 6e+29): tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.3e+169) || !(x <= 6e+29)) tmp = Float64(60.0 * Float64(x / Float64(z - 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.3e+169) || ~((x <= 6e+29))) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.3e+169], N[Not[LessEqual[x, 6e+29]], $MachinePrecision]], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+169} \lor \neg \left(x \leq 6 \cdot 10^{+29}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -4.3000000000000001e169 or 5.9999999999999998e29 < x Initial program 98.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 75.8%
Taylor expanded in x around inf 69.0%
if -4.3000000000000001e169 < x < 5.9999999999999998e29Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 66.1%
Final simplification67.2%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.3e+170) (/ -60.0 (/ (- t z) x)) (if (<= x 6e+29) (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.3e+170) {
tmp = -60.0 / ((t - z) / x);
} else if (x <= 6e+29) {
tmp = a * 120.0;
} else {
tmp = 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 (x <= (-1.3d+170)) then
tmp = (-60.0d0) / ((t - z) / x)
else if (x <= 6d+29) then
tmp = a * 120.0d0
else
tmp = 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 (x <= -1.3e+170) {
tmp = -60.0 / ((t - z) / x);
} else if (x <= 6e+29) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.3e+170: tmp = -60.0 / ((t - z) / x) elif x <= 6e+29: tmp = a * 120.0 else: tmp = x * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.3e+170) tmp = Float64(-60.0 / Float64(Float64(t - z) / x)); elseif (x <= 6e+29) tmp = Float64(a * 120.0); else tmp = 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 (x <= -1.3e+170) tmp = -60.0 / ((t - z) / x); elseif (x <= 6e+29) tmp = a * 120.0; else tmp = x * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.3e+170], N[(-60.0 / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e+29], N[(a * 120.0), $MachinePrecision], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+170}:\\
\;\;\;\;\frac{-60}{\frac{t - z}{x}}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+29}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if x < -1.2999999999999999e170Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.0%
Taylor expanded in x around inf 81.0%
clear-num81.0%
div-inv81.2%
frac-2neg81.2%
metadata-eval81.2%
distribute-neg-frac281.2%
Applied egg-rr81.2%
if -1.2999999999999999e170 < x < 5.9999999999999998e29Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 66.1%
if 5.9999999999999998e29 < x Initial program 98.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 98.4%
Taylor expanded in x around inf 60.2%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.1e+169) (* 60.0 (/ x (- z t))) (if (<= x 6e+29) (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.1e+169) {
tmp = 60.0 * (x / (z - t));
} else if (x <= 6e+29) {
tmp = a * 120.0;
} else {
tmp = 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 (x <= (-6.1d+169)) then
tmp = 60.0d0 * (x / (z - t))
else if (x <= 6d+29) then
tmp = a * 120.0d0
else
tmp = 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 (x <= -6.1e+169) {
tmp = 60.0 * (x / (z - t));
} else if (x <= 6e+29) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.1e+169: tmp = 60.0 * (x / (z - t)) elif x <= 6e+29: tmp = a * 120.0 else: tmp = x * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.1e+169) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (x <= 6e+29) tmp = Float64(a * 120.0); else tmp = 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 (x <= -6.1e+169) tmp = 60.0 * (x / (z - t)); elseif (x <= 6e+29) tmp = a * 120.0; else tmp = x * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.1e+169], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e+29], N[(a * 120.0), $MachinePrecision], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.1 \cdot 10^{+169}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+29}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if x < -6.0999999999999998e169Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.0%
Taylor expanded in x around inf 81.0%
if -6.0999999999999998e169 < x < 5.9999999999999998e29Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 66.1%
if 5.9999999999999998e29 < x Initial program 98.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 98.4%
Taylor expanded in x around inf 60.2%
Final simplification67.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.8e+196) (not (<= y 2.6e+247))) (* 60.0 (/ y t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+196) || !(y <= 2.6e+247)) {
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 <= (-1.8d+196)) .or. (.not. (y <= 2.6d+247))) 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 <= -1.8e+196) || !(y <= 2.6e+247)) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.8e+196) or not (y <= 2.6e+247): tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.8e+196) || !(y <= 2.6e+247)) 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 <= -1.8e+196) || ~((y <= 2.6e+247))) 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, -1.8e+196], N[Not[LessEqual[y, 2.6e+247]], $MachinePrecision]], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+196} \lor \neg \left(y \leq 2.6 \cdot 10^{+247}\right):\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.80000000000000004e196 or 2.59999999999999991e247 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.9%
associate-*r/89.9%
Simplified89.9%
Taylor expanded in z around 0 61.5%
associate-*r/61.5%
*-commutative61.5%
Simplified61.5%
Taylor expanded in t around 0 58.2%
Taylor expanded in y around inf 58.1%
if -1.80000000000000004e196 < y < 2.59999999999999991e247Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 54.8%
Final simplification55.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -6.5e+194) (* 60.0 (/ y t)) (if (<= y 9.8e+250) (* a 120.0) (/ (* 60.0 y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.5e+194) {
tmp = 60.0 * (y / t);
} else if (y <= 9.8e+250) {
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 <= (-6.5d+194)) then
tmp = 60.0d0 * (y / t)
else if (y <= 9.8d+250) 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 <= -6.5e+194) {
tmp = 60.0 * (y / t);
} else if (y <= 9.8e+250) {
tmp = a * 120.0;
} else {
tmp = (60.0 * y) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -6.5e+194: tmp = 60.0 * (y / t) elif y <= 9.8e+250: tmp = a * 120.0 else: tmp = (60.0 * y) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6.5e+194) tmp = Float64(60.0 * Float64(y / t)); elseif (y <= 9.8e+250) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 * y) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -6.5e+194) tmp = 60.0 * (y / t); elseif (y <= 9.8e+250) tmp = a * 120.0; else tmp = (60.0 * y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.5e+194], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e+250], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+194}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+250}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot y}{t}\\
\end{array}
\end{array}
if y < -6.50000000000000005e194Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 84.3%
associate-*r/84.2%
Simplified84.2%
Taylor expanded in z around 0 56.0%
associate-*r/55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in t around 0 50.8%
Taylor expanded in y around inf 50.7%
if -6.50000000000000005e194 < y < 9.79999999999999986e250Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 54.8%
if 9.79999999999999986e250 < y Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in z around 0 71.4%
associate-*r/71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in t around 0 71.6%
Taylor expanded in y around inf 71.6%
Final simplification55.1%
(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.4%
associate-/l*99.7%
Simplified99.7%
(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%
Simplified99.7%
Taylor expanded in z around inf 50.6%
Final simplification50.6%
(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 2024110
(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)))