
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e-33)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (or (<= (* a 120.0) 1e-131)
(and (not (<= (* a 120.0) 2e-59)) (<= (* a 120.0) 1e+47)))
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* 60.0 (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e-33) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (((a * 120.0) <= 1e-131) || (!((a * 120.0) <= 2e-59) && ((a * 120.0) <= 1e+47))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (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 ((a * 120.0d0) <= (-5d-33)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if (((a * 120.0d0) <= 1d-131) .or. (.not. ((a * 120.0d0) <= 2d-59)) .and. ((a * 120.0d0) <= 1d+47)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (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 ((a * 120.0) <= -5e-33) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (((a * 120.0) <= 1e-131) || (!((a * 120.0) <= 2e-59) && ((a * 120.0) <= 1e+47))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e-33: tmp = (a * 120.0) + (-60.0 * (x / t)) elif ((a * 120.0) <= 1e-131) or (not ((a * 120.0) <= 2e-59) and ((a * 120.0) <= 1e+47)): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e-33) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif ((Float64(a * 120.0) <= 1e-131) || (!(Float64(a * 120.0) <= 2e-59) && (Float64(a * 120.0) <= 1e+47))) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e-33) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif (((a * 120.0) <= 1e-131) || (~(((a * 120.0) <= 2e-59)) && ((a * 120.0) <= 1e+47))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-33], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-131], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-59]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e+47]]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-33}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-131} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-59}\right) \land a \cdot 120 \leq 10^{+47}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.00000000000000028e-33Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 81.5%
associate-*r/81.5%
neg-mul-181.5%
neg-sub081.5%
sub-neg81.5%
+-commutative81.5%
associate--r+81.5%
neg-sub081.5%
remove-double-neg81.5%
Simplified81.5%
Taylor expanded in y around 0 78.1%
if -5.00000000000000028e-33 < (*.f64 a #s(literal 120 binary64)) < 9.9999999999999999e-132 or 2.0000000000000001e-59 < (*.f64 a #s(literal 120 binary64)) < 1e47Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 81.2%
if 9.9999999999999999e-132 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-59 or 1e47 < (*.f64 a #s(literal 120 binary64)) Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 75.0%
associate-*r/75.0%
neg-mul-175.0%
neg-sub075.0%
sub-neg75.0%
+-commutative75.0%
associate--r+75.0%
neg-sub075.0%
remove-double-neg75.0%
Simplified75.0%
Taylor expanded in y around inf 77.6%
Final simplification79.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e-58) (not (<= (- z t) 20000000000.0))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x))) (/ 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 = (a * 120.0) + (60.0 / ((z - t) / x));
} 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 = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
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 = (a * 120.0) + (60.0 / ((z - t) / x));
} 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 = (a * 120.0) + (60.0 / ((z - t) / x)) 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(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); 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 = (a * 120.0) + (60.0 / ((z - t) / x)); 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[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $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):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\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.8%
Simplified99.8%
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))) (+ (* a 120.0) (* 60.0 (/ x (- z t)))) (/ 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 = (a * 120.0) + (60.0 * (x / (z - t)));
} 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 = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
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 = (a * 120.0) + (60.0 * (x / (z - t)));
} 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 = (a * 120.0) + (60.0 * (x / (z - t))) 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(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); 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 = (a * 120.0) + (60.0 * (x / (z - t))); 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[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $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):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\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
(if (<= z -2.3e-17)
(+ (* a 120.0) (/ 60.0 (/ z x)))
(if (<= z 7.2e-295)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= z 3.5e+20)
(- (* a 120.0) (/ 60.0 (/ t x)))
(+ (* a 120.0) (/ (* 60.0 x) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e-17) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if (z <= 7.2e-295) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 3.5e+20) {
tmp = (a * 120.0) - (60.0 / (t / x));
} else {
tmp = (a * 120.0) + ((60.0 * x) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.3d-17)) then
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
else if (z <= 7.2d-295) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (z <= 3.5d+20) then
tmp = (a * 120.0d0) - (60.0d0 / (t / x))
else
tmp = (a * 120.0d0) + ((60.0d0 * x) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e-17) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if (z <= 7.2e-295) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 3.5e+20) {
tmp = (a * 120.0) - (60.0 / (t / x));
} else {
tmp = (a * 120.0) + ((60.0 * x) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e-17: tmp = (a * 120.0) + (60.0 / (z / x)) elif z <= 7.2e-295: tmp = 60.0 / ((z - t) / (x - y)) elif z <= 3.5e+20: tmp = (a * 120.0) - (60.0 / (t / x)) else: tmp = (a * 120.0) + ((60.0 * x) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e-17) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); elseif (z <= 7.2e-295) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (z <= 3.5e+20) tmp = Float64(Float64(a * 120.0) - Float64(60.0 / Float64(t / x))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e-17) tmp = (a * 120.0) + (60.0 / (z / x)); elseif (z <= 7.2e-295) tmp = 60.0 / ((z - t) / (x - y)); elseif (z <= 3.5e+20) tmp = (a * 120.0) - (60.0 / (t / x)); else tmp = (a * 120.0) + ((60.0 * x) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e-17], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e-295], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+20], N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-295}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+20}:\\
\;\;\;\;a \cdot 120 - \frac{60}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z}\\
\end{array}
\end{array}
if z < -2.30000000000000009e-17Initial program 98.4%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 88.4%
Taylor expanded in z around inf 79.3%
if -2.30000000000000009e-17 < z < 7.2000000000000003e-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 7.2000000000000003e-295 < z < 3.5e20Initial 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%
if 3.5e20 < z Initial program 99.9%
Taylor expanded in z around inf 90.0%
Taylor expanded in x around inf 84.0%
associate-*r/84.0%
Simplified84.0%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.4e-16)
(+ (* a 120.0) (/ 60.0 (/ z x)))
(if (<= z 1.4e-288)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= z 7e+25)
(+ (* a 120.0) (/ (* x -60.0) t))
(+ (* a 120.0) (/ (* 60.0 x) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e-16) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if (z <= 1.4e-288) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 7e+25) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else {
tmp = (a * 120.0) + ((60.0 * x) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.4d-16)) then
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
else if (z <= 1.4d-288) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (z <= 7d+25) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
else
tmp = (a * 120.0d0) + ((60.0d0 * x) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e-16) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if (z <= 1.4e-288) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 7e+25) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else {
tmp = (a * 120.0) + ((60.0 * x) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e-16: tmp = (a * 120.0) + (60.0 / (z / x)) elif z <= 1.4e-288: tmp = 60.0 / ((z - t) / (x - y)) elif z <= 7e+25: tmp = (a * 120.0) + ((x * -60.0) / t) else: tmp = (a * 120.0) + ((60.0 * x) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e-16) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); elseif (z <= 1.4e-288) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (z <= 7e+25) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.4e-16) tmp = (a * 120.0) + (60.0 / (z / x)); elseif (z <= 1.4e-288) tmp = 60.0 / ((z - t) / (x - y)); elseif (z <= 7e+25) tmp = (a * 120.0) + ((x * -60.0) / t); else tmp = (a * 120.0) + ((60.0 * x) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e-16], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-288], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+25], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-16}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-288}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+25}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z}\\
\end{array}
\end{array}
if z < -1.4000000000000001e-16Initial program 98.4%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 88.4%
Taylor expanded in z around inf 79.3%
if -1.4000000000000001e-16 < z < 1.4e-288Initial 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-288 < z < 6.99999999999999999e25Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 89.1%
associate-*r/89.1%
neg-mul-189.1%
neg-sub089.1%
sub-neg89.1%
+-commutative89.1%
associate--r+89.1%
neg-sub089.1%
remove-double-neg89.1%
Simplified89.1%
Taylor expanded in y around 0 78.2%
associate-*r/78.2%
Simplified78.2%
if 6.99999999999999999e25 < z Initial program 99.9%
Taylor expanded in z around inf 90.0%
Taylor expanded in x around inf 84.0%
associate-*r/84.0%
Simplified84.0%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.8e-19)
(+ (* a 120.0) (/ 60.0 (/ z x)))
(if (<= z 2e-295)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 3.5e+26)
(+ (* a 120.0) (/ (* x -60.0) t))
(+ (* a 120.0) (/ (* 60.0 x) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e-19) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if (z <= 2e-295) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 3.5e+26) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else {
tmp = (a * 120.0) + ((60.0 * x) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.8d-19)) then
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
else if (z <= 2d-295) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 3.5d+26) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
else
tmp = (a * 120.0d0) + ((60.0d0 * x) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e-19) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if (z <= 2e-295) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 3.5e+26) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else {
tmp = (a * 120.0) + ((60.0 * x) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e-19: tmp = (a * 120.0) + (60.0 / (z / x)) elif z <= 2e-295: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 3.5e+26: tmp = (a * 120.0) + ((x * -60.0) / t) else: tmp = (a * 120.0) + ((60.0 * x) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e-19) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); elseif (z <= 2e-295) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 3.5e+26) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e-19) tmp = (a * 120.0) + (60.0 / (z / x)); elseif (z <= 2e-295) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 3.5e+26) tmp = (a * 120.0) + ((x * -60.0) / t); else tmp = (a * 120.0) + ((60.0 * x) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e-19], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-295], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+26], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-19}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-295}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+26}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z}\\
\end{array}
\end{array}
if z < -6.8000000000000004e-19Initial program 98.4%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 88.4%
Taylor expanded in z around inf 79.3%
if -6.8000000000000004e-19 < z < 2.00000000000000012e-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%
if 2.00000000000000012e-295 < z < 3.4999999999999999e26Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 89.1%
associate-*r/89.1%
neg-mul-189.1%
neg-sub089.1%
sub-neg89.1%
+-commutative89.1%
associate--r+89.1%
neg-sub089.1%
remove-double-neg89.1%
Simplified89.1%
Taylor expanded in y around 0 78.2%
associate-*r/78.2%
Simplified78.2%
if 3.4999999999999999e26 < z Initial program 99.9%
Taylor expanded in z around inf 90.0%
Taylor expanded in x around inf 84.0%
associate-*r/84.0%
Simplified84.0%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ 60.0 (/ z x)))))
(if (<= z -1.32e-16)
t_1
(if (<= z 1.75e-295)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 2.7e+22) (+ (* a 120.0) (/ (* x -60.0) t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / (z / x));
double tmp;
if (z <= -1.32e-16) {
tmp = t_1;
} else if (z <= 1.75e-295) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 2.7e+22) {
tmp = (a * 120.0) + ((x * -60.0) / 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 = (a * 120.0d0) + (60.0d0 / (z / x))
if (z <= (-1.32d-16)) then
tmp = t_1
else if (z <= 1.75d-295) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 2.7d+22) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / 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 = (a * 120.0) + (60.0 / (z / x));
double tmp;
if (z <= -1.32e-16) {
tmp = t_1;
} else if (z <= 1.75e-295) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 2.7e+22) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 / (z / x)) tmp = 0 if z <= -1.32e-16: tmp = t_1 elif z <= 1.75e-295: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 2.7e+22: tmp = (a * 120.0) + ((x * -60.0) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))) tmp = 0.0 if (z <= -1.32e-16) tmp = t_1; elseif (z <= 1.75e-295) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 2.7e+22) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (60.0 / (z / x)); tmp = 0.0; if (z <= -1.32e-16) tmp = t_1; elseif (z <= 1.75e-295) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 2.7e+22) tmp = (a * 120.0) + ((x * -60.0) / t); else tmp = t_1; 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[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.32e-16], t$95$1, If[LessEqual[z, 1.75e-295], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+22], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.32 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-295}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+22}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.32e-16 or 2.7000000000000002e22 < z Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 90.6%
Taylor expanded in z around inf 81.1%
if -1.32e-16 < z < 1.74999999999999994e-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%
if 1.74999999999999994e-295 < z < 2.7000000000000002e22Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 89.1%
associate-*r/89.1%
neg-mul-189.1%
neg-sub089.1%
sub-neg89.1%
+-commutative89.1%
associate--r+89.1%
neg-sub089.1%
remove-double-neg89.1%
Simplified89.1%
Taylor expanded in y around 0 78.2%
associate-*r/78.2%
Simplified78.2%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ 60.0 (/ z x)))))
(if (<= z -1.65e-18)
t_1
(if (<= z 7.8e-294)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 1.75e+28) (+ (* a 120.0) (* -60.0 (/ x t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / (z / x));
double tmp;
if (z <= -1.65e-18) {
tmp = t_1;
} else if (z <= 7.8e-294) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 1.75e+28) {
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 = (a * 120.0d0) + (60.0d0 / (z / x))
if (z <= (-1.65d-18)) then
tmp = t_1
else if (z <= 7.8d-294) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 1.75d+28) 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 = (a * 120.0) + (60.0 / (z / x));
double tmp;
if (z <= -1.65e-18) {
tmp = t_1;
} else if (z <= 7.8e-294) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 1.75e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 / (z / x)) tmp = 0 if z <= -1.65e-18: tmp = t_1 elif z <= 7.8e-294: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 1.75e+28: 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(a * 120.0) + Float64(60.0 / Float64(z / x))) tmp = 0.0 if (z <= -1.65e-18) tmp = t_1; elseif (z <= 7.8e-294) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 1.75e+28) 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 = (a * 120.0) + (60.0 / (z / x)); tmp = 0.0; if (z <= -1.65e-18) tmp = t_1; elseif (z <= 7.8e-294) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 1.75e+28) 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[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e-18], t$95$1, If[LessEqual[z, 7.8e-294], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+28], 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 := a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-294}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.6500000000000001e-18 or 1.75e28 < z Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 90.6%
Taylor expanded in z around inf 81.1%
if -1.6500000000000001e-18 < z < 7.8000000000000005e-294Initial 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 7.8000000000000005e-294 < z < 1.75e28Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 89.1%
associate-*r/89.1%
neg-mul-189.1%
neg-sub089.1%
sub-neg89.1%
+-commutative89.1%
associate--r+89.1%
neg-sub089.1%
remove-double-neg89.1%
Simplified89.1%
Taylor expanded in y around 0 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 -2.35e+24)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(if (<= x 14500000.0)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (* 60.0 (/ x (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.35e+24) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 14500000.0) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (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 (x <= (-2.35d+24)) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else if (x <= 14500000.0d0) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (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 (x <= -2.35e+24) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 14500000.0) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.35e+24: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) elif x <= 14500000.0: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (x / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.35e+24) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); elseif (x <= 14500000.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + 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 (x <= -2.35e+24) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); elseif (x <= 14500000.0) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (60.0 * (x / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.35e+24], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 14500000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{+24}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;x \leq 14500000:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if x < -2.35e24Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 94.2%
if -2.35e24 < x < 1.45e7Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 94.7%
associate-*r/94.6%
Simplified94.6%
if 1.45e7 < 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 -5.8e+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 <= -5.8e+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 <= (-5.8d+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 <= -5.8e+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 <= -5.8e+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 <= -5.8e+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 <= -5.8e+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, -5.8e+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 -5.8 \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 < -5.8000000000000001e169 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 -5.8000000000000001e169 < 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 (or (<= y -3.4e+196) (not (<= y 2.5e+245))) (* 60.0 (/ y t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.4e+196) || !(y <= 2.5e+245)) {
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 <= (-3.4d+196)) .or. (.not. (y <= 2.5d+245))) 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 <= -3.4e+196) || !(y <= 2.5e+245)) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.4e+196) or not (y <= 2.5e+245): tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.4e+196) || !(y <= 2.5e+245)) 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 <= -3.4e+196) || ~((y <= 2.5e+245))) 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, -3.4e+196], N[Not[LessEqual[y, 2.5e+245]], $MachinePrecision]], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+196} \lor \neg \left(y \leq 2.5 \cdot 10^{+245}\right):\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -3.4e196 or 2.50000000000000017e245 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 66.9%
associate-*r/66.9%
neg-mul-166.9%
neg-sub066.9%
sub-neg66.9%
+-commutative66.9%
associate--r+66.9%
neg-sub066.9%
remove-double-neg66.9%
Simplified66.9%
Taylor expanded in t around 0 63.6%
Taylor expanded in y around inf 58.1%
if -3.4e196 < y < 2.50000000000000017e245Initial 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 -2e+195) (* 60.0 (/ y t)) (if (<= y 4.6e+251) (* a 120.0) (/ (* 60.0 y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2e+195) {
tmp = 60.0 * (y / t);
} else if (y <= 4.6e+251) {
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 <= (-2d+195)) then
tmp = 60.0d0 * (y / t)
else if (y <= 4.6d+251) 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 <= -2e+195) {
tmp = 60.0 * (y / t);
} else if (y <= 4.6e+251) {
tmp = a * 120.0;
} else {
tmp = (60.0 * y) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2e+195: tmp = 60.0 * (y / t) elif y <= 4.6e+251: tmp = a * 120.0 else: tmp = (60.0 * y) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2e+195) tmp = Float64(60.0 * Float64(y / t)); elseif (y <= 4.6e+251) 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 <= -2e+195) tmp = 60.0 * (y / t); elseif (y <= 4.6e+251) tmp = a * 120.0; else tmp = (60.0 * y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2e+195], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+251], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+195}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+251}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot y}{t}\\
\end{array}
\end{array}
if y < -1.99999999999999995e195Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 64.3%
associate-*r/64.3%
neg-mul-164.3%
neg-sub064.3%
sub-neg64.3%
+-commutative64.3%
associate--r+64.3%
neg-sub064.3%
remove-double-neg64.3%
Simplified64.3%
Taylor expanded in t around 0 59.1%
Taylor expanded in y around inf 50.7%
if -1.99999999999999995e195 < y < 4.59999999999999976e251Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 54.8%
if 4.59999999999999976e251 < y Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 71.4%
associate-*r/71.4%
neg-mul-171.4%
neg-sub071.4%
sub-neg71.4%
+-commutative71.4%
associate--r+71.4%
neg-sub071.4%
remove-double-neg71.4%
Simplified71.4%
Taylor expanded in t around 0 71.6%
Taylor expanded in y around inf 71.4%
associate-*r/71.6%
Simplified71.6%
Final simplification55.1%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (* 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)))