
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e-11)
t_1
(if (<= t_1 5e-66)
(* a 120.0)
(if (<= t_1 200000000000.0)
(+ (* a 120.0) (/ 60.0 (/ (- t) x)))
t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-11) {
tmp = t_1;
} else if (t_1 <= 5e-66) {
tmp = a * 120.0;
} else if (t_1 <= 200000000000.0) {
tmp = (a * 120.0) + (60.0 / (-t / x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d-11)) then
tmp = t_1
else if (t_1 <= 5d-66) then
tmp = a * 120.0d0
else if (t_1 <= 200000000000.0d0) then
tmp = (a * 120.0d0) + (60.0d0 / (-t / x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-11) {
tmp = t_1;
} else if (t_1 <= 5e-66) {
tmp = a * 120.0;
} else if (t_1 <= 200000000000.0) {
tmp = (a * 120.0) + (60.0 / (-t / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e-11: tmp = t_1 elif t_1 <= 5e-66: tmp = a * 120.0 elif t_1 <= 200000000000.0: tmp = (a * 120.0) + (60.0 / (-t / x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e-11) tmp = t_1; elseif (t_1 <= 5e-66) tmp = Float64(a * 120.0); elseif (t_1 <= 200000000000.0) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(-t) / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e-11) tmp = t_1; elseif (t_1 <= 5e-66) tmp = a * 120.0; elseif (t_1 <= 200000000000.0) tmp = (a * 120.0) + (60.0 / (-t / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-11], t$95$1, If[LessEqual[t$95$1, 5e-66], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 200000000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[((-t) / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-66}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t_1 \leq 200000000000:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{-t}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.00000000000000018e-11 or 2e11 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 98.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.1%
associate-*r/81.2%
Applied egg-rr81.2%
if -5.00000000000000018e-11 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.99999999999999962e-66Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.3%
if 4.99999999999999962e-66 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2e11Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.8%
Taylor expanded in z around 0 82.8%
mul-1-neg82.8%
distribute-neg-frac82.8%
Simplified82.8%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e-11)
t_1
(if (<= t_1 5e-66)
(* a 120.0)
(if (<= t_1 200000000000.0) (+ (* a 120.0) (* -60.0 (/ x t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-11) {
tmp = t_1;
} else if (t_1 <= 5e-66) {
tmp = a * 120.0;
} else if (t_1 <= 200000000000.0) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d-11)) then
tmp = t_1
else if (t_1 <= 5d-66) then
tmp = a * 120.0d0
else if (t_1 <= 200000000000.0d0) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-11) {
tmp = t_1;
} else if (t_1 <= 5e-66) {
tmp = a * 120.0;
} else if (t_1 <= 200000000000.0) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e-11: tmp = t_1 elif t_1 <= 5e-66: tmp = a * 120.0 elif t_1 <= 200000000000.0: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e-11) tmp = t_1; elseif (t_1 <= 5e-66) tmp = Float64(a * 120.0); elseif (t_1 <= 200000000000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e-11) tmp = t_1; elseif (t_1 <= 5e-66) tmp = a * 120.0; elseif (t_1 <= 200000000000.0) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-11], t$95$1, If[LessEqual[t$95$1, 5e-66], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 200000000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-66}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t_1 \leq 200000000000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.00000000000000018e-11 or 2e11 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 98.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.1%
associate-*r/81.2%
Applied egg-rr81.2%
if -5.00000000000000018e-11 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.99999999999999962e-66Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.3%
if 4.99999999999999962e-66 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2e11Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.8%
Taylor expanded in z around 0 82.7%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -1e-27) (+ (* a 120.0) (/ -60.0 (/ z y))) (if (<= (* a 120.0) 5e-8) (* 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 * 120.0) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 / (z / y));
} else if ((a * 120.0) <= 5e-8) {
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 * 120.0d0) <= (-1d-27)) then
tmp = (a * 120.0d0) + ((-60.0d0) / (z / y))
else if ((a * 120.0d0) <= 5d-8) 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 * 120.0) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 / (z / y));
} else if ((a * 120.0) <= 5e-8) {
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 * 120.0) <= -1e-27: tmp = (a * 120.0) + (-60.0 / (z / y)) elif (a * 120.0) <= 5e-8: 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 (Float64(a * 120.0) <= -1e-27) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(z / y))); elseif (Float64(a * 120.0) <= 5e-8) 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 * 120.0) <= -1e-27) tmp = (a * 120.0) + (-60.0 / (z / y)); elseif ((a * 120.0) <= 5e-8) 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[N[(a * 120.0), $MachinePrecision], -1e-27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-8], 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 \cdot 120 \leq -1 \cdot 10^{-27}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-8}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-27Initial program 98.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 85.2%
associate-*r/85.3%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 72.2%
if -1e-27 < (*.f64 a 120) < 4.9999999999999998e-8Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
if 4.9999999999999998e-8 < (*.f64 a 120) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-27)
(+ (* a 120.0) (/ -60.0 (/ z y)))
(if (<= (* a 120.0) 5e-8)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (/ 60.0 (/ z x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 / (z / y));
} else if ((a * 120.0) <= 5e-8) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / (z / 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) <= (-1d-27)) then
tmp = (a * 120.0d0) + ((-60.0d0) / (z / y))
else if ((a * 120.0d0) <= 5d-8) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 / (z / 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) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 / (z / y));
} else if ((a * 120.0) <= 5e-8) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-27: tmp = (a * 120.0) + (-60.0 / (z / y)) elif (a * 120.0) <= 5e-8: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 / (z / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-27) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(z / y))); elseif (Float64(a * 120.0) <= 5e-8) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-27) tmp = (a * 120.0) + (-60.0 / (z / y)); elseif ((a * 120.0) <= 5e-8) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-8], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-27}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-8}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-27Initial program 98.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 85.2%
associate-*r/85.3%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 72.2%
if -1e-27 < (*.f64 a 120) < 4.9999999999999998e-8Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
if 4.9999999999999998e-8 < (*.f64 a 120) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.7%
Taylor expanded in z around inf 81.0%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-27)
(+ (* a 120.0) (/ -60.0 (/ z y)))
(if (<= (* a 120.0) 5e-8)
(/ 60.0 (/ (- z t) (- x y)))
(+ (* a 120.0) (/ 60.0 (/ z x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 / (z / y));
} else if ((a * 120.0) <= 5e-8) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + (60.0 / (z / 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) <= (-1d-27)) then
tmp = (a * 120.0d0) + ((-60.0d0) / (z / y))
else if ((a * 120.0d0) <= 5d-8) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = (a * 120.0d0) + (60.0d0 / (z / 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) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 / (z / y));
} else if ((a * 120.0) <= 5e-8) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + (60.0 / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-27: tmp = (a * 120.0) + (-60.0 / (z / y)) elif (a * 120.0) <= 5e-8: tmp = 60.0 / ((z - t) / (x - y)) else: tmp = (a * 120.0) + (60.0 / (z / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-27) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(z / y))); elseif (Float64(a * 120.0) <= 5e-8) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-27) tmp = (a * 120.0) + (-60.0 / (z / y)); elseif ((a * 120.0) <= 5e-8) tmp = 60.0 / ((z - t) / (x - y)); else tmp = (a * 120.0) + (60.0 / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-8], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-27}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-8}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-27Initial program 98.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 85.2%
associate-*r/85.3%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 72.2%
if -1e-27 < (*.f64 a 120) < 4.9999999999999998e-8Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
expm1-log1p-u49.0%
expm1-udef28.5%
associate-*r/28.5%
Applied egg-rr28.5%
expm1-def49.0%
expm1-log1p79.6%
associate-/l*79.4%
Simplified79.4%
if 4.9999999999999998e-8 < (*.f64 a 120) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.7%
Taylor expanded in z around inf 81.0%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= x -8.5e+118)
t_1
(if (<= x 9.5e-268)
(* a 120.0)
(if (<= x 1.3e-227)
(/ (* y -60.0) (- z t))
(if (<= x 2.3e+21) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (x <= -8.5e+118) {
tmp = t_1;
} else if (x <= 9.5e-268) {
tmp = a * 120.0;
} else if (x <= 1.3e-227) {
tmp = (y * -60.0) / (z - t);
} else if (x <= 2.3e+21) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
if (x <= (-8.5d+118)) then
tmp = t_1
else if (x <= 9.5d-268) then
tmp = a * 120.0d0
else if (x <= 1.3d-227) then
tmp = (y * (-60.0d0)) / (z - t)
else if (x <= 2.3d+21) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (x <= -8.5e+118) {
tmp = t_1;
} else if (x <= 9.5e-268) {
tmp = a * 120.0;
} else if (x <= 1.3e-227) {
tmp = (y * -60.0) / (z - t);
} else if (x <= 2.3e+21) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if x <= -8.5e+118: tmp = t_1 elif x <= 9.5e-268: tmp = a * 120.0 elif x <= 1.3e-227: tmp = (y * -60.0) / (z - t) elif x <= 2.3e+21: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (x <= -8.5e+118) tmp = t_1; elseif (x <= 9.5e-268) tmp = Float64(a * 120.0); elseif (x <= 1.3e-227) tmp = Float64(Float64(y * -60.0) / Float64(z - t)); elseif (x <= 2.3e+21) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (x / (z - t)); tmp = 0.0; if (x <= -8.5e+118) tmp = t_1; elseif (x <= 9.5e-268) tmp = a * 120.0; elseif (x <= 1.3e-227) tmp = (y * -60.0) / (z - t); elseif (x <= 2.3e+21) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e+118], t$95$1, If[LessEqual[x, 9.5e-268], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 1.3e-227], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e+21], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-268}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-227}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+21}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -8.50000000000000033e118 or 2.3e21 < x Initial program 97.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.9%
Taylor expanded in x around inf 70.7%
if -8.50000000000000033e118 < x < 9.50000000000000007e-268 or 1.30000000000000006e-227 < x < 2.3e21Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 64.7%
if 9.50000000000000007e-268 < x < 1.30000000000000006e-227Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 78.3%
Taylor expanded in x around 0 70.3%
associate-*r/70.3%
Simplified70.3%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -220000000.0) (not (<= x 8e-9))) (+ (/ 60.0 (/ (- z t) x)) (* a 120.0)) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -220000000.0) || !(x <= 8e-9)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (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 <= (-220000000.0d0)) .or. (.not. (x <= 8d-9))) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else
tmp = ((-60.0d0) / ((z - t) / y)) + (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 <= -220000000.0) || !(x <= 8e-9)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -220000000.0) or not (x <= 8e-9): tmp = (60.0 / ((z - t) / x)) + (a * 120.0) else: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -220000000.0) || !(x <= 8e-9)) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -220000000.0) || ~((x <= 8e-9))) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); else tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -220000000.0], N[Not[LessEqual[x, 8e-9]], $MachinePrecision]], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -220000000 \lor \neg \left(x \leq 8 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\end{array}
\end{array}
if x < -2.2e8 or 8.0000000000000005e-9 < x Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 89.1%
if -2.2e8 < x < 8.0000000000000005e-9Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 96.9%
associate-*r/96.9%
associate-/l*96.9%
Simplified96.9%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -21000000.0) (not (<= x 2.05e-8))) (+ (/ 60.0 (/ (- z t) x)) (* 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 <= -21000000.0) || !(x <= 2.05e-8)) {
tmp = (60.0 / ((z - t) / x)) + (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 <= (-21000000.0d0)) .or. (.not. (x <= 2.05d-8))) then
tmp = (60.0d0 / ((z - t) / x)) + (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 <= -21000000.0) || !(x <= 2.05e-8)) {
tmp = (60.0 / ((z - t) / x)) + (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 <= -21000000.0) or not (x <= 2.05e-8): tmp = (60.0 / ((z - t) / x)) + (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 <= -21000000.0) || !(x <= 2.05e-8)) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + 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 <= -21000000.0) || ~((x <= 2.05e-8))) tmp = (60.0 / ((z - t) / x)) + (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, -21000000.0], N[Not[LessEqual[x, 2.05e-8]], $MachinePrecision]], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $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 -21000000 \lor \neg \left(x \leq 2.05 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -2.1e7 or 2.05000000000000016e-8 < x Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 89.1%
if -2.1e7 < x < 2.05000000000000016e-8Initial program 99.9%
Taylor expanded in x around 0 96.9%
Final simplification92.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.7e+117)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= x 2.2e+21)
(+ (/ -60.0 (/ (- z t) y)) (* a 120.0))
(/ (* 60.0 (- x y)) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.7e+117) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (x <= 2.2e+21) {
tmp = (-60.0 / ((z - t) / y)) + (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 (x <= (-4.7d+117)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (x <= 2.2d+21) then
tmp = ((-60.0d0) / ((z - t) / y)) + (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 (x <= -4.7e+117) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (x <= 2.2e+21) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.7e+117: tmp = 60.0 / ((z - t) / (x - y)) elif x <= 2.2e+21: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) else: tmp = (60.0 * (x - y)) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.7e+117) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (x <= 2.2e+21) tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.7e+117) tmp = 60.0 / ((z - t) / (x - y)); elseif (x <= 2.2e+21) tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); else tmp = (60.0 * (x - y)) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.7e+117], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+21], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+117}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+21}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if x < -4.70000000000000006e117Initial program 95.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.9%
expm1-log1p-u36.5%
expm1-udef24.7%
associate-*r/24.7%
Applied egg-rr24.7%
expm1-def36.6%
expm1-log1p77.0%
associate-/l*77.0%
Simplified77.0%
if -4.70000000000000006e117 < x < 2.2e21Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 91.6%
associate-*r/91.7%
associate-/l*91.6%
Simplified91.6%
if 2.2e21 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 80.5%
associate-*r/80.6%
Applied egg-rr80.6%
Final simplification86.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.4e-31) (* a 120.0) (if (<= a 4.8e-10) (* 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 <= -3.4e-31) {
tmp = a * 120.0;
} else if (a <= 4.8e-10) {
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 <= (-3.4d-31)) then
tmp = a * 120.0d0
else if (a <= 4.8d-10) 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 <= -3.4e-31) {
tmp = a * 120.0;
} else if (a <= 4.8e-10) {
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 <= -3.4e-31: tmp = a * 120.0 elif a <= 4.8e-10: 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 <= -3.4e-31) tmp = Float64(a * 120.0); elseif (a <= 4.8e-10) 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 <= -3.4e-31) tmp = a * 120.0; elseif (a <= 4.8e-10) 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, -3.4e-31], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.8e-10], 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 -3.4 \cdot 10^{-31}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-10}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.4000000000000001e-31 or 4.8e-10 < a Initial program 98.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.9%
if -3.4000000000000001e-31 < a < 4.8e-10Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.8e+122) (not (<= x 2.5e+21))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.8e+122) || !(x <= 2.5e+21)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-1.8d+122)) .or. (.not. (x <= 2.5d+21))) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.8e+122) || !(x <= 2.5e+21)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.8e+122) or not (x <= 2.5e+21): tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.8e+122) || !(x <= 2.5e+21)) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.8e+122) || ~((x <= 2.5e+21))) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.8e+122], N[Not[LessEqual[x, 2.5e+21]], $MachinePrecision]], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+122} \lor \neg \left(x \leq 2.5 \cdot 10^{+21}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.8000000000000001e122 or 2.5e21 < x Initial program 97.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.9%
Taylor expanded in x around inf 70.7%
if -1.8000000000000001e122 < x < 2.5e21Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.3%
Final simplification64.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.2e-105) (* a 120.0) (if (<= a 8e-95) (* -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.2e-105) {
tmp = a * 120.0;
} else if (a <= 8e-95) {
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.2d-105)) then
tmp = a * 120.0d0
else if (a <= 8d-95) 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.2e-105) {
tmp = a * 120.0;
} else if (a <= 8e-95) {
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.2e-105: tmp = a * 120.0 elif a <= 8e-95: 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.2e-105) tmp = Float64(a * 120.0); elseif (a <= 8e-95) 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.2e-105) tmp = a * 120.0; elseif (a <= 8e-95) 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.2e-105], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 8e-95], 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.2 \cdot 10^{-105}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-95}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -5.1999999999999997e-105 or 7.99999999999999992e-95 < a Initial program 98.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 66.3%
if -5.1999999999999997e-105 < a < 7.99999999999999992e-95Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 85.1%
Taylor expanded in z around 0 46.4%
Final simplification58.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7.5e+185) (not (<= x 5e+163))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.5e+185) || !(x <= 5e+163)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-7.5d+185)) .or. (.not. (x <= 5d+163))) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.5e+185) || !(x <= 5e+163)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7.5e+185) or not (x <= 5e+163): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7.5e+185) || !(x <= 5e+163)) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -7.5e+185) || ~((x <= 5e+163))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7.5e+185], N[Not[LessEqual[x, 5e+163]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+185} \lor \neg \left(x \leq 5 \cdot 10^{+163}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -7.49999999999999955e185 or 5e163 < x Initial program 96.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 83.1%
Taylor expanded in z around 0 47.3%
Taylor expanded in x around inf 47.2%
if -7.49999999999999955e185 < x < 5e163Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.0%
Final simplification54.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.5e+182) (/ (* x -60.0) t) (if (<= x 1.7e+162) (* a 120.0) (* -60.0 (/ x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.5e+182) {
tmp = (x * -60.0) / t;
} else if (x <= 1.7e+162) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-6.5d+182)) then
tmp = (x * (-60.0d0)) / t
else if (x <= 1.7d+162) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.5e+182) {
tmp = (x * -60.0) / t;
} else if (x <= 1.7e+162) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.5e+182: tmp = (x * -60.0) / t elif x <= 1.7e+162: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.5e+182) tmp = Float64(Float64(x * -60.0) / t); elseif (x <= 1.7e+162) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.5e+182) tmp = (x * -60.0) / t; elseif (x <= 1.7e+162) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.5e+182], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[x, 1.7e+162], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+182}:\\
\;\;\;\;\frac{x \cdot -60}{t}\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+162}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < -6.4999999999999998e182Initial program 93.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
Taylor expanded in z around 0 46.7%
Taylor expanded in x around inf 46.6%
associate-*r/46.7%
Simplified46.7%
if -6.4999999999999998e182 < x < 1.70000000000000001e162Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.0%
if 1.70000000000000001e162 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 86.7%
Taylor expanded in z around 0 47.9%
Taylor expanded in x around inf 47.9%
Final simplification54.4%
(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.8%
Simplified99.8%
Taylor expanded in z around inf 46.6%
Final simplification46.6%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023275
(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)))