
(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 (fma 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.8%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -20000000.0)
(* a 120.0)
(if (<= (* a 120.0) 1e-102)
t_1
(if (<= (* a 120.0) 2e-58)
(* a 120.0)
(if (<= (* a 120.0) 2e+21)
t_1
(+ (* a 120.0) (/ x (* t -0.016666666666666666)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -20000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-102) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-58) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e+21) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-20000000.0d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-102) then
tmp = t_1
else if ((a * 120.0d0) <= 2d-58) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d+21) then
tmp = t_1
else
tmp = (a * 120.0d0) + (x / (t * (-0.016666666666666666d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -20000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-102) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-58) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e+21) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -20000000.0: tmp = a * 120.0 elif (a * 120.0) <= 1e-102: tmp = t_1 elif (a * 120.0) <= 2e-58: tmp = a * 120.0 elif (a * 120.0) <= 2e+21: tmp = t_1 else: tmp = (a * 120.0) + (x / (t * -0.016666666666666666)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -20000000.0) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-102) tmp = t_1; elseif (Float64(a * 120.0) <= 2e-58) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e+21) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(t * -0.016666666666666666))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -20000000.0) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-102) tmp = t_1; elseif ((a * 120.0) <= 2e-58) tmp = a * 120.0; elseif ((a * 120.0) <= 2e+21) tmp = t_1; else tmp = (a * 120.0) + (x / (t * -0.016666666666666666)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -20000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-102], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-58], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+21], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -20000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-58}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{t \cdot -0.016666666666666666}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e7 or 9.99999999999999933e-103 < (*.f64 a 120) < 2.0000000000000001e-58Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.9%
if -2e7 < (*.f64 a 120) < 9.99999999999999933e-103 or 2.0000000000000001e-58 < (*.f64 a 120) < 2e21Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.8%
if 2e21 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 93.6%
associate-*r/93.6%
*-commutative93.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in z around 0 82.6%
*-commutative82.6%
Simplified82.6%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -20000000.0)
(* a 120.0)
(if (<= (* a 120.0) 1e-102)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 2e-58)
(* a 120.0)
(if (<= (* a 120.0) 2e+21)
(/ 60.0 (/ (- z t) (- x y)))
(+ (* a 120.0) (/ x (* t -0.016666666666666666))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -20000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-102) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 2e-58) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e+21) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-20000000.0d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-102) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 2d-58) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d+21) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = (a * 120.0d0) + (x / (t * (-0.016666666666666666d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -20000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-102) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 2e-58) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e+21) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -20000000.0: tmp = a * 120.0 elif (a * 120.0) <= 1e-102: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 2e-58: tmp = a * 120.0 elif (a * 120.0) <= 2e+21: tmp = 60.0 / ((z - t) / (x - y)) else: tmp = (a * 120.0) + (x / (t * -0.016666666666666666)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -20000000.0) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-102) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 2e-58) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e+21) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(t * -0.016666666666666666))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -20000000.0) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-102) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 2e-58) tmp = a * 120.0; elseif ((a * 120.0) <= 2e+21) tmp = 60.0 / ((z - t) / (x - y)); else tmp = (a * 120.0) + (x / (t * -0.016666666666666666)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -20000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-102], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-58], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+21], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -20000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-102}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-58}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+21}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{t \cdot -0.016666666666666666}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e7 or 9.99999999999999933e-103 < (*.f64 a 120) < 2.0000000000000001e-58Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.9%
if -2e7 < (*.f64 a 120) < 9.99999999999999933e-103Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.5%
if 2.0000000000000001e-58 < (*.f64 a 120) < 2e21Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 72.0%
associate-*r/72.3%
associate-/l*72.3%
Simplified72.3%
if 2e21 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 93.6%
associate-*r/93.6%
*-commutative93.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in z around 0 82.6%
*-commutative82.6%
Simplified82.6%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -2.3e-78)
(* a 120.0)
(if (<= a -3e-264)
t_1
(if (<= a 2.05e-104)
(* 60.0 (/ x (- z t)))
(if (<= a 2.1e-54)
(* a 120.0)
(if (<= a 3.2e-11) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -2.3e-78) {
tmp = a * 120.0;
} else if (a <= -3e-264) {
tmp = t_1;
} else if (a <= 2.05e-104) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 2.1e-54) {
tmp = a * 120.0;
} else if (a <= 3.2e-11) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (a <= (-2.3d-78)) then
tmp = a * 120.0d0
else if (a <= (-3d-264)) then
tmp = t_1
else if (a <= 2.05d-104) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 2.1d-54) then
tmp = a * 120.0d0
else if (a <= 3.2d-11) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -2.3e-78) {
tmp = a * 120.0;
} else if (a <= -3e-264) {
tmp = t_1;
} else if (a <= 2.05e-104) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 2.1e-54) {
tmp = a * 120.0;
} else if (a <= 3.2e-11) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -2.3e-78: tmp = a * 120.0 elif a <= -3e-264: tmp = t_1 elif a <= 2.05e-104: tmp = 60.0 * (x / (z - t)) elif a <= 2.1e-54: tmp = a * 120.0 elif a <= 3.2e-11: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -2.3e-78) tmp = Float64(a * 120.0); elseif (a <= -3e-264) tmp = t_1; elseif (a <= 2.05e-104) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 2.1e-54) tmp = Float64(a * 120.0); elseif (a <= 3.2e-11) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -2.3e-78) tmp = a * 120.0; elseif (a <= -3e-264) tmp = t_1; elseif (a <= 2.05e-104) tmp = 60.0 * (x / (z - t)); elseif (a <= 2.1e-54) tmp = a * 120.0; elseif (a <= 3.2e-11) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e-78], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3e-264], t$95$1, If[LessEqual[a, 2.05e-104], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e-54], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.2e-11], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{-78}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{-104}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-54}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.3000000000000002e-78 or 2.04999999999999992e-104 < a < 2.1e-54 or 3.19999999999999994e-11 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.2%
if -2.3000000000000002e-78 < a < -3e-264 or 2.1e-54 < a < 3.19999999999999994e-11Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 49.0%
if -3e-264 < a < 2.04999999999999992e-104Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 61.3%
Final simplification65.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -46000.0)
(* a 120.0)
(if (or (<= a 3.1e-102) (and (not (<= a 1.35e-60)) (<= a 4.7e-11)))
(* 60.0 (/ (- x y) (- z t)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -46000.0) {
tmp = a * 120.0;
} else if ((a <= 3.1e-102) || (!(a <= 1.35e-60) && (a <= 4.7e-11))) {
tmp = 60.0 * ((x - y) / (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 (a <= (-46000.0d0)) then
tmp = a * 120.0d0
else if ((a <= 3.1d-102) .or. (.not. (a <= 1.35d-60)) .and. (a <= 4.7d-11)) then
tmp = 60.0d0 * ((x - y) / (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 (a <= -46000.0) {
tmp = a * 120.0;
} else if ((a <= 3.1e-102) || (!(a <= 1.35e-60) && (a <= 4.7e-11))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -46000.0: tmp = a * 120.0 elif (a <= 3.1e-102) or (not (a <= 1.35e-60) and (a <= 4.7e-11)): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -46000.0) tmp = Float64(a * 120.0); elseif ((a <= 3.1e-102) || (!(a <= 1.35e-60) && (a <= 4.7e-11))) tmp = Float64(60.0 * Float64(Float64(x - y) / 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 (a <= -46000.0) tmp = a * 120.0; elseif ((a <= 3.1e-102) || (~((a <= 1.35e-60)) && (a <= 4.7e-11))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -46000.0], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[a, 3.1e-102], And[N[Not[LessEqual[a, 1.35e-60]], $MachinePrecision], LessEqual[a, 4.7e-11]]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -46000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-102} \lor \neg \left(a \leq 1.35 \cdot 10^{-60}\right) \land a \leq 4.7 \cdot 10^{-11}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -46000 or 3.10000000000000013e-102 < a < 1.35e-60 or 4.69999999999999993e-11 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
if -46000 < a < 3.10000000000000013e-102 or 1.35e-60 < a < 4.69999999999999993e-11Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.5%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* 60.0 (/ y t)))))
(if (<= t -2.05e+71)
t_1
(if (<= t -0.00056)
(* 60.0 (/ (- x y) (- z t)))
(if (<= t 1.15e+25) (+ (* a 120.0) (* (- x y) (/ 60.0 z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 * (y / t));
double tmp;
if (t <= -2.05e+71) {
tmp = t_1;
} else if (t <= -0.00056) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t <= 1.15e+25) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + (60.0d0 * (y / t))
if (t <= (-2.05d+71)) then
tmp = t_1
else if (t <= (-0.00056d0)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (t <= 1.15d+25) then
tmp = (a * 120.0d0) + ((x - y) * (60.0d0 / z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 * (y / t));
double tmp;
if (t <= -2.05e+71) {
tmp = t_1;
} else if (t <= -0.00056) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t <= 1.15e+25) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 * (y / t)) tmp = 0 if t <= -2.05e+71: tmp = t_1 elif t <= -0.00056: tmp = 60.0 * ((x - y) / (z - t)) elif t <= 1.15e+25: tmp = (a * 120.0) + ((x - y) * (60.0 / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))) tmp = 0.0 if (t <= -2.05e+71) tmp = t_1; elseif (t <= -0.00056) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (t <= 1.15e+25) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (60.0 * (y / t)); tmp = 0.0; if (t <= -2.05e+71) tmp = t_1; elseif (t <= -0.00056) tmp = 60.0 * ((x - y) / (z - t)); elseif (t <= 1.15e+25) tmp = (a * 120.0) + ((x - y) * (60.0 / z)); 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[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.05e+71], t$95$1, If[LessEqual[t, -0.00056], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+25], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -0.00056:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+25}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.0500000000000001e71 or 1.1499999999999999e25 < t Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.9%
Applied egg-rr99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in x around 0 82.8%
if -2.0500000000000001e71 < t < -5.5999999999999995e-4Initial program 99.5%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in a around 0 85.0%
if -5.5999999999999995e-4 < t < 1.1499999999999999e25Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 83.2%
associate-/r/83.2%
Applied egg-rr83.2%
Final simplification83.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* 60.0 (/ y t)))))
(if (<= t -9.8e+70)
t_1
(if (<= t -0.13)
(* 60.0 (/ (- x y) (- z t)))
(if (<= t 1.55e+25) (+ (* a 120.0) (/ 60.0 (/ z (- x y)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 * (y / t));
double tmp;
if (t <= -9.8e+70) {
tmp = t_1;
} else if (t <= -0.13) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t <= 1.55e+25) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} 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 * (y / t))
if (t <= (-9.8d+70)) then
tmp = t_1
else if (t <= (-0.13d0)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (t <= 1.55d+25) then
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
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 * (y / t));
double tmp;
if (t <= -9.8e+70) {
tmp = t_1;
} else if (t <= -0.13) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t <= 1.55e+25) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 * (y / t)) tmp = 0 if t <= -9.8e+70: tmp = t_1 elif t <= -0.13: tmp = 60.0 * ((x - y) / (z - t)) elif t <= 1.55e+25: tmp = (a * 120.0) + (60.0 / (z / (x - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))) tmp = 0.0 if (t <= -9.8e+70) tmp = t_1; elseif (t <= -0.13) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (t <= 1.55e+25) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (60.0 * (y / t)); tmp = 0.0; if (t <= -9.8e+70) tmp = t_1; elseif (t <= -0.13) tmp = 60.0 * ((x - y) / (z - t)); elseif (t <= 1.55e+25) tmp = (a * 120.0) + (60.0 / (z / (x - y))); 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[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.8e+70], t$95$1, If[LessEqual[t, -0.13], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+25], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -9.8 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -0.13:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+25}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.80000000000000056e70 or 1.5499999999999999e25 < t Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.9%
Applied egg-rr99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in x around 0 82.8%
if -9.80000000000000056e70 < t < -0.13Initial program 99.5%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in a around 0 85.0%
if -0.13 < t < 1.5499999999999999e25Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 83.2%
Final simplification83.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -1.06e+102)
t_1
(if (<= y 6.6e-20)
(* a 120.0)
(if (<= y 9.5e+24)
(/ 60.0 (/ (- t) x))
(if (<= y 1.08e+136) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -1.06e+102) {
tmp = t_1;
} else if (y <= 6.6e-20) {
tmp = a * 120.0;
} else if (y <= 9.5e+24) {
tmp = 60.0 / (-t / x);
} else if (y <= 1.08e+136) {
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) * (y / (z - t))
if (y <= (-1.06d+102)) then
tmp = t_1
else if (y <= 6.6d-20) then
tmp = a * 120.0d0
else if (y <= 9.5d+24) then
tmp = 60.0d0 / (-t / x)
else if (y <= 1.08d+136) 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 * (y / (z - t));
double tmp;
if (y <= -1.06e+102) {
tmp = t_1;
} else if (y <= 6.6e-20) {
tmp = a * 120.0;
} else if (y <= 9.5e+24) {
tmp = 60.0 / (-t / x);
} else if (y <= 1.08e+136) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -1.06e+102: tmp = t_1 elif y <= 6.6e-20: tmp = a * 120.0 elif y <= 9.5e+24: tmp = 60.0 / (-t / x) elif y <= 1.08e+136: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -1.06e+102) tmp = t_1; elseif (y <= 6.6e-20) tmp = Float64(a * 120.0); elseif (y <= 9.5e+24) tmp = Float64(60.0 / Float64(Float64(-t) / x)); elseif (y <= 1.08e+136) 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 * (y / (z - t)); tmp = 0.0; if (y <= -1.06e+102) tmp = t_1; elseif (y <= 6.6e-20) tmp = a * 120.0; elseif (y <= 9.5e+24) tmp = 60.0 / (-t / x); elseif (y <= 1.08e+136) 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[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.06e+102], t$95$1, If[LessEqual[y, 6.6e-20], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 9.5e+24], N[(60.0 / N[((-t) / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e+136], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-20}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{60}{\frac{-t}{x}}\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{+136}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.06000000000000001e102 or 1.07999999999999994e136 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 59.8%
if -1.06000000000000001e102 < y < 6.6e-20 or 9.5000000000000001e24 < y < 1.07999999999999994e136Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.6%
if 6.6e-20 < y < 9.5000000000000001e24Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 100.0%
associate-*r/99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 75.6%
Taylor expanded in z around 0 64.4%
neg-mul-164.4%
distribute-neg-frac64.4%
Simplified64.4%
Final simplification62.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -1.05e+101)
t_1
(if (<= y 6.6e-20)
(* a 120.0)
(if (<= y 2.8e+24)
(* -60.0 (/ (- x y) t))
(if (<= y 1.18e+139) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -1.05e+101) {
tmp = t_1;
} else if (y <= 6.6e-20) {
tmp = a * 120.0;
} else if (y <= 2.8e+24) {
tmp = -60.0 * ((x - y) / t);
} else if (y <= 1.18e+139) {
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) * (y / (z - t))
if (y <= (-1.05d+101)) then
tmp = t_1
else if (y <= 6.6d-20) then
tmp = a * 120.0d0
else if (y <= 2.8d+24) then
tmp = (-60.0d0) * ((x - y) / t)
else if (y <= 1.18d+139) 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 * (y / (z - t));
double tmp;
if (y <= -1.05e+101) {
tmp = t_1;
} else if (y <= 6.6e-20) {
tmp = a * 120.0;
} else if (y <= 2.8e+24) {
tmp = -60.0 * ((x - y) / t);
} else if (y <= 1.18e+139) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -1.05e+101: tmp = t_1 elif y <= 6.6e-20: tmp = a * 120.0 elif y <= 2.8e+24: tmp = -60.0 * ((x - y) / t) elif y <= 1.18e+139: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -1.05e+101) tmp = t_1; elseif (y <= 6.6e-20) tmp = Float64(a * 120.0); elseif (y <= 2.8e+24) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (y <= 1.18e+139) 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 * (y / (z - t)); tmp = 0.0; if (y <= -1.05e+101) tmp = t_1; elseif (y <= 6.6e-20) tmp = a * 120.0; elseif (y <= 2.8e+24) tmp = -60.0 * ((x - y) / t); elseif (y <= 1.18e+139) 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[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e+101], t$95$1, If[LessEqual[y, 6.6e-20], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 2.8e+24], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.18e+139], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-20}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+24}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{+139}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.05e101 or 1.18e139 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 59.8%
if -1.05e101 < y < 6.6e-20 or 2.8000000000000002e24 < y < 1.18e139Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.6%
if 6.6e-20 < y < 2.8000000000000002e24Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 100.0%
associate-*r/99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 76.9%
Final simplification63.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.25e+101) (not (<= y 5e+141))) (* 60.0 (/ (- x y) (- z t))) (+ (/ 60.0 (/ (- z t) x)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.25e+101) || !(y <= 5e+141)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (60.0 / ((z - t) / x)) + (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.25d+101)) .or. (.not. (y <= 5d+141))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (60.0d0 / ((z - t) / x)) + (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.25e+101) || !(y <= 5e+141)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.25e+101) or not (y <= 5e+141): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (60.0 / ((z - t) / x)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.25e+101) || !(y <= 5e+141)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.25e+101) || ~((y <= 5e+141))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (60.0 / ((z - t) / x)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.25e+101], N[Not[LessEqual[y, 5e+141]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+101} \lor \neg \left(y \leq 5 \cdot 10^{+141}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\end{array}
\end{array}
if y < -1.24999999999999997e101 or 5.00000000000000025e141 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 74.6%
if -1.24999999999999997e101 < y < 5.00000000000000025e141Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.6%
Final simplification86.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.06e+102) (not (<= y 9.2e+139))) (* 60.0 (/ (- x y) (- z t))) (+ (/ x (/ (- z t) 60.0)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.06e+102) || !(y <= 9.2e+139)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (x / ((z - t) / 60.0)) + (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.06d+102)) .or. (.not. (y <= 9.2d+139))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (x / ((z - t) / 60.0d0)) + (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.06e+102) || !(y <= 9.2e+139)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.06e+102) or not (y <= 9.2e+139): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (x / ((z - t) / 60.0)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.06e+102) || !(y <= 9.2e+139)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.06e+102) || ~((y <= 9.2e+139))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (x / ((z - t) / 60.0)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.06e+102], N[Not[LessEqual[y, 9.2e+139]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+102} \lor \neg \left(y \leq 9.2 \cdot 10^{+139}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\end{array}
\end{array}
if y < -1.06000000000000001e102 or 9.2e139 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 74.6%
if -1.06000000000000001e102 < y < 9.2e139Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.6%
associate-*r/91.6%
*-commutative91.6%
associate-/l*91.6%
Simplified91.6%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.25e-5) (not (<= x 4.1e+51))) (+ (/ x (/ (- z t) 60.0)) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.25e-5) || !(x <= 4.1e+51)) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (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.25d-5)) .or. (.not. (x <= 4.1d+51))) then
tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (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.25e-5) || !(x <= 4.1e+51)) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.25e-5) or not (x <= 4.1e+51): tmp = (x / ((z - t) / 60.0)) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.25e-5) || !(x <= 4.1e+51)) tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / 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.25e-5) || ~((x <= 4.1e+51))) tmp = (x / ((z - t) / 60.0)) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.25e-5], N[Not[LessEqual[x, 4.1e+51]], $MachinePrecision]], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.25 \cdot 10^{-5} \lor \neg \left(x \leq 4.1 \cdot 10^{+51}\right):\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -2.25000000000000014e-5 or 4.10000000000000011e51 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 89.5%
associate-*r/89.4%
*-commutative89.4%
associate-/l*89.4%
Simplified89.4%
if -2.25000000000000014e-5 < x < 4.10000000000000011e51Initial program 99.9%
Taylor expanded in x around 0 94.9%
Final simplification92.3%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.6e-5)
(+ (/ x (/ (- z t) 60.0)) (* a 120.0))
(if (<= x 1.9e+47)
(+ (/ (* 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 <= -4.6e-5) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else if (x <= 1.9e+47) {
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 <= (-4.6d-5)) then
tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
else if (x <= 1.9d+47) 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 <= -4.6e-5) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else if (x <= 1.9e+47) {
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 <= -4.6e-5: tmp = (x / ((z - t) / 60.0)) + (a * 120.0) elif x <= 1.9e+47: 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 <= -4.6e-5) tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); elseif (x <= 1.9e+47) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.6e-5) tmp = (x / ((z - t) / 60.0)) + (a * 120.0); elseif (x <= 1.9e+47) 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, -4.6e-5], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+47], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+47}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -4.6e-5Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 87.7%
associate-*r/87.6%
*-commutative87.6%
associate-/l*87.6%
Simplified87.6%
if -4.6e-5 < x < 1.9000000000000002e47Initial program 99.9%
Taylor expanded in x around 0 95.5%
if 1.9000000000000002e47 < x Initial program 99.8%
Taylor expanded in x around inf 90.6%
*-commutative90.6%
Simplified90.6%
Final simplification92.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.1e-78)
(* a 120.0)
(if (<= a -1.25e-128)
(* 60.0 (/ y t))
(if (<= a -2.9e-138)
(* -60.0 (/ y z))
(if (<= a 9.2e-103) (* 60.0 (/ x z)) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e-78) {
tmp = a * 120.0;
} else if (a <= -1.25e-128) {
tmp = 60.0 * (y / t);
} else if (a <= -2.9e-138) {
tmp = -60.0 * (y / z);
} else if (a <= 9.2e-103) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.1d-78)) then
tmp = a * 120.0d0
else if (a <= (-1.25d-128)) then
tmp = 60.0d0 * (y / t)
else if (a <= (-2.9d-138)) then
tmp = (-60.0d0) * (y / z)
else if (a <= 9.2d-103) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e-78) {
tmp = a * 120.0;
} else if (a <= -1.25e-128) {
tmp = 60.0 * (y / t);
} else if (a <= -2.9e-138) {
tmp = -60.0 * (y / z);
} else if (a <= 9.2e-103) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.1e-78: tmp = a * 120.0 elif a <= -1.25e-128: tmp = 60.0 * (y / t) elif a <= -2.9e-138: tmp = -60.0 * (y / z) elif a <= 9.2e-103: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.1e-78) tmp = Float64(a * 120.0); elseif (a <= -1.25e-128) tmp = Float64(60.0 * Float64(y / t)); elseif (a <= -2.9e-138) tmp = Float64(-60.0 * Float64(y / z)); elseif (a <= 9.2e-103) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.1e-78) tmp = a * 120.0; elseif (a <= -1.25e-128) tmp = 60.0 * (y / t); elseif (a <= -2.9e-138) tmp = -60.0 * (y / z); elseif (a <= 9.2e-103) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e-78], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.25e-128], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.9e-138], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e-103], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{-78}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.25 \cdot 10^{-128}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-138}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{-103}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.1000000000000001e-78 or 9.2000000000000003e-103 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.7%
if -2.1000000000000001e-78 < a < -1.25e-128Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 56.2%
Taylor expanded in z around 0 50.0%
if -1.25e-128 < a < -2.89999999999999973e-138Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
associate-/r/99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 52.3%
Taylor expanded in z around inf 52.3%
if -2.89999999999999973e-138 < a < 9.2000000000000003e-103Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 84.8%
associate-*r/84.7%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in x around inf 52.3%
Taylor expanded in z around inf 38.0%
Final simplification59.1%
(FPCore (x y z t a) :precision binary64 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (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 = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(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}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.2e-137) (* a 120.0) (if (<= a 7.6e-105) (* 60.0 (/ x z)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.2e-137) {
tmp = a * 120.0;
} else if (a <= 7.6e-105) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-6.2d-137)) then
tmp = a * 120.0d0
else if (a <= 7.6d-105) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.2e-137) {
tmp = a * 120.0;
} else if (a <= 7.6e-105) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.2e-137: tmp = a * 120.0 elif a <= 7.6e-105: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.2e-137) tmp = Float64(a * 120.0); elseif (a <= 7.6e-105) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.2e-137) tmp = a * 120.0; elseif (a <= 7.6e-105) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.2e-137], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 7.6e-105], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{-137}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{-105}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.19999999999999955e-137 or 7.5999999999999995e-105 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 66.0%
if -6.19999999999999955e-137 < a < 7.5999999999999995e-105Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 85.0%
associate-*r/84.9%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in x around inf 51.7%
Taylor expanded in z around inf 37.5%
Final simplification57.6%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 51.9%
Final simplification51.9%
(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 2023192
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))