
(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 17 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 (+ (* (- 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.1%
*-commutative99.1%
associate-/l*99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-11)
(+ (* a 120.0) (* y (/ 60.0 t)))
(if (<= (* a 120.0) 2e-59)
(* (- x y) (/ 60.0 (- z t)))
(if (<= (* a 120.0) 5e+105)
(+ (* a 120.0) (* -60.0 (/ x t)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-11) {
tmp = (a * 120.0) + (y * (60.0 / t));
} else if ((a * 120.0) <= 2e-59) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 5e+105) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-11)) then
tmp = (a * 120.0d0) + (y * (60.0d0 / t))
else if ((a * 120.0d0) <= 2d-59) then
tmp = (x - y) * (60.0d0 / (z - t))
else if ((a * 120.0d0) <= 5d+105) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-11) {
tmp = (a * 120.0) + (y * (60.0 / t));
} else if ((a * 120.0) <= 2e-59) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 5e+105) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-11: tmp = (a * 120.0) + (y * (60.0 / t)) elif (a * 120.0) <= 2e-59: tmp = (x - y) * (60.0 / (z - t)) elif (a * 120.0) <= 5e+105: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-11) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(60.0 / t))); elseif (Float64(a * 120.0) <= 2e-59) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (Float64(a * 120.0) <= 5e+105) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-11) tmp = (a * 120.0) + (y * (60.0 / t)); elseif ((a * 120.0) <= 2e-59) tmp = (x - y) * (60.0 / (z - t)); elseif ((a * 120.0) <= 5e+105) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-11], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-59], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+105], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-11}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-59}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+105}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999988e-11Initial program 98.4%
Taylor expanded in x around 0 90.4%
Taylor expanded in z around 0 82.3%
associate-*r/82.4%
*-commutative82.4%
associate-/l*82.4%
Simplified82.4%
if -1.99999999999999988e-11 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-59Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.8%
associate-*r/78.8%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
if 2.0000000000000001e-59 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000046e105Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.2%
associate-*r/83.2%
Simplified83.2%
Taylor expanded in z around 0 78.9%
if 5.00000000000000046e105 < (*.f64 a #s(literal 120 binary64)) Initial program 98.0%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around inf 96.0%
Final simplification82.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-11)
(* a 120.0)
(if (<= (* a 120.0) 2e-59)
(* (- x y) (/ 60.0 (- z t)))
(if (<= (* a 120.0) 5e+105)
(+ (* a 120.0) (* -60.0 (/ x t)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-11) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-59) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 5e+105) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-11)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-59) then
tmp = (x - y) * (60.0d0 / (z - t))
else if ((a * 120.0d0) <= 5d+105) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-11) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-59) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 5e+105) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-11: tmp = a * 120.0 elif (a * 120.0) <= 2e-59: tmp = (x - y) * (60.0 / (z - t)) elif (a * 120.0) <= 5e+105: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-11) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-59) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (Float64(a * 120.0) <= 5e+105) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-11) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-59) tmp = (x - y) * (60.0 / (z - t)); elseif ((a * 120.0) <= 5e+105) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-11], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-59], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+105], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-11}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-59}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+105}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999988e-11 or 5.00000000000000046e105 < (*.f64 a #s(literal 120 binary64)) Initial program 98.2%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 85.4%
if -1.99999999999999988e-11 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-59Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.8%
associate-*r/78.8%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
if 2.0000000000000001e-59 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000046e105Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.2%
associate-*r/83.2%
Simplified83.2%
Taylor expanded in z around 0 78.9%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-39) (not (<= (* a 120.0) 2e-224))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (/ 60.0 (/ (- t z) (- y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-39) || !((a * 120.0) <= 2e-224)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = 60.0 / ((t - z) / (y - x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-2d-39)) .or. (.not. ((a * 120.0d0) <= 2d-224))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = 60.0d0 / ((t - z) / (y - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-39) || !((a * 120.0) <= 2e-224)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = 60.0 / ((t - z) / (y - x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-39) or not ((a * 120.0) <= 2e-224): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = 60.0 / ((t - z) / (y - x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-39) || !(Float64(a * 120.0) <= 2e-224)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(60.0 / Float64(Float64(t - z) / Float64(y - x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e-39) || ~(((a * 120.0) <= 2e-224))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = 60.0 / ((t - z) / (y - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-39], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-224]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 / N[(N[(t - z), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-39} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-224}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{t - z}{y - x}}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999986e-39 or 2e-224 < (*.f64 a #s(literal 120 binary64)) Initial program 98.9%
Taylor expanded in x around 0 85.5%
if -1.99999999999999986e-39 < (*.f64 a #s(literal 120 binary64)) < 2e-224Initial program 99.7%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in a around 0 85.2%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr85.4%
Final simplification85.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -155.0)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= t 3.8e-18)
(+ (* a 120.0) (/ 60.0 (/ z (- x y))))
(if (<= t 3.55e+47)
(* (- x y) (/ 60.0 (- z t)))
(+ (* a 120.0) (* y (/ 60.0 t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -155.0) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t <= 3.8e-18) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else if (t <= 3.55e+47) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (y * (60.0 / 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 (t <= (-155.0d0)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if (t <= 3.8d-18) then
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
else if (t <= 3.55d+47) then
tmp = (x - y) * (60.0d0 / (z - t))
else
tmp = (a * 120.0d0) + (y * (60.0d0 / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -155.0) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t <= 3.8e-18) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else if (t <= 3.55e+47) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (y * (60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -155.0: tmp = (a * 120.0) + (-60.0 * (x / t)) elif t <= 3.8e-18: tmp = (a * 120.0) + (60.0 / (z / (x - y))) elif t <= 3.55e+47: tmp = (x - y) * (60.0 / (z - t)) else: tmp = (a * 120.0) + (y * (60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -155.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (t <= 3.8e-18) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); elseif (t <= 3.55e+47) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -155.0) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif (t <= 3.8e-18) tmp = (a * 120.0) + (60.0 / (z / (x - y))); elseif (t <= 3.55e+47) tmp = (x - y) * (60.0 / (z - t)); else tmp = (a * 120.0) + (y * (60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -155.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-18], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.55e+47], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -155:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-18}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\mathbf{elif}\;t \leq 3.55 \cdot 10^{+47}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\
\end{array}
\end{array}
if t < -155Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 83.5%
associate-*r/83.5%
Simplified83.5%
Taylor expanded in z around 0 82.2%
if -155 < t < 3.7999999999999998e-18Initial program 98.1%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 83.5%
if 3.7999999999999998e-18 < t < 3.5500000000000001e47Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.8%
associate-*r/89.9%
associate-*l/89.9%
*-commutative89.9%
Simplified89.9%
if 3.5500000000000001e47 < t Initial program 99.8%
Taylor expanded in x around 0 83.8%
Taylor expanded in z around 0 83.8%
associate-*r/83.8%
*-commutative83.8%
associate-/l*83.8%
Simplified83.8%
Final simplification83.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -46.0)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= t 3.4e-18)
(+ (* a 120.0) (* 60.0 (/ (- x y) z)))
(if (<= t 3.9e+47)
(* (- x y) (/ 60.0 (- z t)))
(+ (* a 120.0) (* y (/ 60.0 t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -46.0) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t <= 3.4e-18) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else if (t <= 3.9e+47) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (y * (60.0 / 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 (t <= (-46.0d0)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if (t <= 3.4d-18) then
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
else if (t <= 3.9d+47) then
tmp = (x - y) * (60.0d0 / (z - t))
else
tmp = (a * 120.0d0) + (y * (60.0d0 / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -46.0) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t <= 3.4e-18) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else if (t <= 3.9e+47) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (y * (60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -46.0: tmp = (a * 120.0) + (-60.0 * (x / t)) elif t <= 3.4e-18: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) elif t <= 3.9e+47: tmp = (x - y) * (60.0 / (z - t)) else: tmp = (a * 120.0) + (y * (60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -46.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (t <= 3.4e-18) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); elseif (t <= 3.9e+47) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -46.0) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif (t <= 3.4e-18) tmp = (a * 120.0) + (60.0 * ((x - y) / z)); elseif (t <= 3.9e+47) tmp = (x - y) * (60.0 / (z - t)); else tmp = (a * 120.0) + (y * (60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -46.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-18], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e+47], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -46:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-18}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+47}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\
\end{array}
\end{array}
if t < -46Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 83.5%
associate-*r/83.5%
Simplified83.5%
Taylor expanded in z around 0 82.2%
if -46 < t < 3.40000000000000001e-18Initial program 98.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 83.5%
if 3.40000000000000001e-18 < t < 3.90000000000000025e47Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.8%
associate-*r/89.9%
associate-*l/89.9%
*-commutative89.9%
Simplified89.9%
if 3.90000000000000025e47 < t Initial program 99.8%
Taylor expanded in x around 0 83.8%
Taylor expanded in z around 0 83.8%
associate-*r/83.8%
*-commutative83.8%
associate-/l*83.8%
Simplified83.8%
Final simplification83.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.4e-25)
(* a 120.0)
(if (<= a -9.8e-219)
(* 60.0 (/ (- x y) z))
(if (<= a 1.28e-200) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.4e-25) {
tmp = a * 120.0;
} else if (a <= -9.8e-219) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 1.28e-200) {
tmp = -60.0 * ((x - 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 (a <= (-7.4d-25)) then
tmp = a * 120.0d0
else if (a <= (-9.8d-219)) then
tmp = 60.0d0 * ((x - y) / z)
else if (a <= 1.28d-200) then
tmp = (-60.0d0) * ((x - 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 (a <= -7.4e-25) {
tmp = a * 120.0;
} else if (a <= -9.8e-219) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 1.28e-200) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.4e-25: tmp = a * 120.0 elif a <= -9.8e-219: tmp = 60.0 * ((x - y) / z) elif a <= 1.28e-200: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.4e-25) tmp = Float64(a * 120.0); elseif (a <= -9.8e-219) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (a <= 1.28e-200) tmp = Float64(-60.0 * Float64(Float64(x - 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 (a <= -7.4e-25) tmp = a * 120.0; elseif (a <= -9.8e-219) tmp = 60.0 * ((x - y) / z); elseif (a <= 1.28e-200) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.4e-25], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -9.8e-219], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.28e-200], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.4 \cdot 10^{-25}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -9.8 \cdot 10^{-219}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;a \leq 1.28 \cdot 10^{-200}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.40000000000000017e-25 or 1.28e-200 < a Initial program 98.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 72.5%
if -7.40000000000000017e-25 < a < -9.79999999999999981e-219Initial program 99.8%
associate-/l*99.7%
fma-define99.6%
Simplified99.6%
Taylor expanded in a around 0 75.2%
Taylor expanded in z around inf 56.2%
if -9.79999999999999981e-219 < a < 1.28e-200Initial program 99.6%
associate-/l*99.5%
fma-define99.5%
Simplified99.5%
Taylor expanded in a around 0 94.6%
Taylor expanded in z around 0 61.9%
Final simplification68.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.4e-23)
(* a 120.0)
(if (<= a -4.4e-241)
(* 60.0 (/ y (- t z)))
(if (<= a 6.4e-201) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.4e-23) {
tmp = a * 120.0;
} else if (a <= -4.4e-241) {
tmp = 60.0 * (y / (t - z));
} else if (a <= 6.4e-201) {
tmp = -60.0 * ((x - 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 (a <= (-5.4d-23)) then
tmp = a * 120.0d0
else if (a <= (-4.4d-241)) then
tmp = 60.0d0 * (y / (t - z))
else if (a <= 6.4d-201) then
tmp = (-60.0d0) * ((x - 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 (a <= -5.4e-23) {
tmp = a * 120.0;
} else if (a <= -4.4e-241) {
tmp = 60.0 * (y / (t - z));
} else if (a <= 6.4e-201) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.4e-23: tmp = a * 120.0 elif a <= -4.4e-241: tmp = 60.0 * (y / (t - z)) elif a <= 6.4e-201: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.4e-23) tmp = Float64(a * 120.0); elseif (a <= -4.4e-241) tmp = Float64(60.0 * Float64(y / Float64(t - z))); elseif (a <= 6.4e-201) tmp = Float64(-60.0 * Float64(Float64(x - 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 (a <= -5.4e-23) tmp = a * 120.0; elseif (a <= -4.4e-241) tmp = 60.0 * (y / (t - z)); elseif (a <= 6.4e-201) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.4e-23], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.4e-241], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.4e-201], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{-23}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-241}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{-201}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -5.3999999999999997e-23 or 6.4000000000000002e-201 < a Initial program 98.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 72.8%
if -5.3999999999999997e-23 < a < -4.3999999999999999e-241Initial program 99.8%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 75.8%
Taylor expanded in x around 0 47.4%
associate-*r/47.4%
remove-double-neg47.4%
neg-mul-147.4%
times-frac47.4%
metadata-eval47.4%
sub-neg47.4%
distribute-neg-in47.4%
remove-double-neg47.4%
+-commutative47.4%
sub-neg47.4%
Simplified47.4%
if -4.3999999999999999e-241 < a < 6.4000000000000002e-201Initial program 99.5%
associate-/l*99.4%
fma-define99.5%
Simplified99.5%
Taylor expanded in a around 0 96.8%
Taylor expanded in z around 0 62.9%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.5e+138) (not (<= y 980000.0))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (/ (* x 60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+138) || !(y <= 980000.0)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-9.5d+138)) .or. (.not. (y <= 980000.0d0))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + ((x * 60.0d0) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+138) || !(y <= 980000.0)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.5e+138) or not (y <= 980000.0): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((x * 60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.5e+138) || !(y <= 980000.0)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.5e+138) || ~((y <= 980000.0))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((x * 60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.5e+138], N[Not[LessEqual[y, 980000.0]], $MachinePrecision]], 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[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+138} \lor \neg \left(y \leq 980000\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\end{array}
\end{array}
if y < -9.49999999999999998e138 or 9.8e5 < y Initial program 97.8%
Taylor expanded in x around 0 89.6%
if -9.49999999999999998e138 < y < 9.8e5Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.0%
associate-*r/93.1%
Simplified93.1%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.3e+138)
(+ (* a 120.0) (/ 60.0 (/ (- t z) y)))
(if (<= y 1580000.0)
(+ (* a 120.0) (/ (* x 60.0) (- z t)))
(+ (* a 120.0) (/ (* y -60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.3e+138) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else if (y <= 1580000.0) {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.3d+138)) then
tmp = (a * 120.0d0) + (60.0d0 / ((t - z) / y))
else if (y <= 1580000.0d0) then
tmp = (a * 120.0d0) + ((x * 60.0d0) / (z - t))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.3e+138) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else if (y <= 1580000.0) {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.3e+138: tmp = (a * 120.0) + (60.0 / ((t - z) / y)) elif y <= 1580000.0: tmp = (a * 120.0) + ((x * 60.0) / (z - t)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.3e+138) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(t - z) / y))); elseif (y <= 1580000.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.3e+138) tmp = (a * 120.0) + (60.0 / ((t - z) / y)); elseif (y <= 1580000.0) tmp = (a * 120.0) + ((x * 60.0) / (z - t)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.3e+138], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1580000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+138}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\
\mathbf{elif}\;y \leq 1580000:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -1.3e138Initial program 94.2%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 89.0%
mul-1-neg89.0%
distribute-neg-frac289.0%
Simplified89.0%
if -1.3e138 < y < 1.58e6Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.0%
associate-*r/93.1%
Simplified93.1%
if 1.58e6 < y Initial program 99.8%
Taylor expanded in x around 0 92.9%
Final simplification92.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.1e-14) (not (<= a 650000000000.0))) (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.1e-14) || !(a <= 650000000000.0)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-4.1d-14)) .or. (.not. (a <= 650000000000.0d0))) then
tmp = a * 120.0d0
else
tmp = (x - y) * (60.0d0 / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.1e-14) || !(a <= 650000000000.0)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.1e-14) or not (a <= 650000000000.0): tmp = a * 120.0 else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.1e-14) || !(a <= 650000000000.0)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.1e-14) || ~((a <= 650000000000.0))) tmp = a * 120.0; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.1e-14], N[Not[LessEqual[a, 650000000000.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{-14} \lor \neg \left(a \leq 650000000000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if a < -4.1000000000000002e-14 or 6.5e11 < a Initial program 98.6%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 80.6%
if -4.1000000000000002e-14 < a < 6.5e11Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 75.7%
associate-*r/75.8%
associate-*l/75.7%
*-commutative75.7%
Simplified75.7%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.6e-22) (not (<= a 2800000000.0))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.6e-22) || !(a <= 2800000000.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.6d-22)) .or. (.not. (a <= 2800000000.0d0))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.6e-22) || !(a <= 2800000000.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.6e-22) or not (a <= 2800000000.0): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.6e-22) || !(a <= 2800000000.0)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.6e-22) || ~((a <= 2800000000.0))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.6e-22], N[Not[LessEqual[a, 2800000000.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-22} \lor \neg \left(a \leq 2800000000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -2.6e-22 or 2.8e9 < a Initial program 98.6%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 80.2%
if -2.6e-22 < a < 2.8e9Initial program 99.7%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in a around 0 76.1%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.3e-43) (not (<= a 1.28e-200))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.3e-43) || !(a <= 1.28e-200)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - 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 <= (-2.3d-43)) .or. (.not. (a <= 1.28d-200))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - 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 <= -2.3e-43) || !(a <= 1.28e-200)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.3e-43) or not (a <= 1.28e-200): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.3e-43) || !(a <= 1.28e-200)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.3e-43) || ~((a <= 1.28e-200))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.3e-43], N[Not[LessEqual[a, 1.28e-200]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-43} \lor \neg \left(a \leq 1.28 \cdot 10^{-200}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -2.2999999999999999e-43 or 1.28e-200 < a Initial program 98.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 71.6%
if -2.2999999999999999e-43 < a < 1.28e-200Initial program 99.7%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in a around 0 85.8%
Taylor expanded in z around 0 46.5%
Final simplification64.2%
(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.1%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.8e+180) (* 60.0 (/ y t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.8e+180) {
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 <= (-2.8d+180)) 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 <= -2.8e+180) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.8e+180: tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.8e+180) 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 <= -2.8e+180) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.8e+180], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+180}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -2.80000000000000012e180Initial program 93.2%
*-commutative93.2%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around inf 82.6%
associate-*r/76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in y around inf 72.4%
associate-*r/69.4%
Simplified69.4%
Taylor expanded in z around 0 45.2%
if -2.80000000000000012e180 < y Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 59.5%
Final simplification57.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.22e+167) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.22e+167) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.22d+167)) then
tmp = (-60.0d0) * (y / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.22e+167) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.22e+167: tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.22e+167) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.22e+167) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.22e+167], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{+167}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.21999999999999996e167Initial program 93.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around inf 57.6%
Taylor expanded in x around 0 51.7%
Taylor expanded in y around inf 41.7%
if -1.21999999999999996e167 < y Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 59.8%
Final simplification57.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.1%
associate-/l*99.7%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 55.3%
Final simplification55.3%
(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 2024185
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))