
(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 (+ (/ 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-20)
t_1
(if (<= t_1 1e+137)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(/ 60.0 (/ (- z t) (- x y)))))))
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-20) {
tmp = t_1;
} else if (t_1 <= 1e+137) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d-20)) then
tmp = t_1
else if (t_1 <= 1d+137) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else
tmp = 60.0d0 / ((z - t) / (x - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-20) {
tmp = t_1;
} else if (t_1 <= 1e+137) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e-20: tmp = t_1 elif t_1 <= 1e+137: tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = 60.0 / ((z - t) / (x - y)) 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-20) tmp = t_1; elseif (t_1 <= 1e+137) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e-20) tmp = t_1; elseif (t_1 <= 1e+137) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = 60.0 / ((z - t) / (x - y)); 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-20], t$95$1, If[LessEqual[t$95$1, 1e+137], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 10^{+137}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999999e-20Initial program 98.2%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.5%
associate-*r/83.5%
Applied egg-rr83.5%
if -4.9999999999999999e-20 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1e137Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.9%
associate-*r/83.9%
associate-*l/83.8%
*-commutative83.8%
Simplified83.8%
if 1e137 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 96.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 92.4%
associate-*r/89.6%
Applied egg-rr89.6%
expm1-log1p-u82.9%
expm1-udef82.9%
*-un-lft-identity82.9%
times-frac85.4%
metadata-eval85.4%
Applied egg-rr85.4%
expm1-def85.4%
expm1-log1p92.4%
associate-*r/89.6%
associate-/l*92.6%
Simplified92.6%
Final simplification84.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+37)
(* a 120.0)
(if (<= (* a 120.0) 2e-44)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 5e+128)
(+ (* a 120.0) (* x (/ 60.0 z)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+37) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 5e+128) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+37)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-44) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 5d+128) then
tmp = (a * 120.0d0) + (x * (60.0d0 / z))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+37) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 5e+128) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+37: tmp = a * 120.0 elif (a * 120.0) <= 2e-44: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 5e+128: tmp = (a * 120.0) + (x * (60.0 / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+37) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-44) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 5e+128) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+37) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-44) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 5e+128) tmp = (a * 120.0) + (x * (60.0 / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+37], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-44], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+128], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+37}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-44}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+128}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999989e37 or 5e128 < (*.f64 a 120) Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.1%
if -4.99999999999999989e37 < (*.f64 a 120) < 1.99999999999999991e-44Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
if 1.99999999999999991e-44 < (*.f64 a 120) < 5e128Initial program 96.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 83.7%
associate-*r/80.7%
associate-*l/83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in z around inf 73.9%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+37)
(* a 120.0)
(if (<= (* a 120.0) 2e-44)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= (* a 120.0) 5e+128)
(+ (* a 120.0) (* x (/ 60.0 z)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+37) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-44) {
tmp = 60.0 / ((z - t) / (x - y));
} else if ((a * 120.0) <= 5e+128) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+37)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-44) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if ((a * 120.0d0) <= 5d+128) then
tmp = (a * 120.0d0) + (x * (60.0d0 / z))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+37) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-44) {
tmp = 60.0 / ((z - t) / (x - y));
} else if ((a * 120.0) <= 5e+128) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+37: tmp = a * 120.0 elif (a * 120.0) <= 2e-44: tmp = 60.0 / ((z - t) / (x - y)) elif (a * 120.0) <= 5e+128: tmp = (a * 120.0) + (x * (60.0 / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+37) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-44) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (Float64(a * 120.0) <= 5e+128) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+37) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-44) tmp = 60.0 / ((z - t) / (x - y)); elseif ((a * 120.0) <= 5e+128) tmp = (a * 120.0) + (x * (60.0 / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+37], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-44], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+128], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+37}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-44}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+128}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999989e37 or 5e128 < (*.f64 a 120) Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.1%
if -4.99999999999999989e37 < (*.f64 a 120) < 1.99999999999999991e-44Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
associate-*r/81.0%
Applied egg-rr81.0%
expm1-log1p-u51.5%
expm1-udef28.6%
*-un-lft-identity28.6%
times-frac28.6%
metadata-eval28.6%
Applied egg-rr28.6%
expm1-def51.5%
expm1-log1p80.9%
associate-*r/81.0%
associate-/l*80.9%
Simplified80.9%
if 1.99999999999999991e-44 < (*.f64 a 120) < 5e128Initial program 96.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 83.7%
associate-*r/80.7%
associate-*l/83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in z around inf 73.9%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+37)
(* a 120.0)
(if (<= (* a 120.0) 2e-44)
(/ (* 60.0 (- x y)) (- z t))
(if (<= (* a 120.0) 5e+128)
(+ (* a 120.0) (* x (/ 60.0 z)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+37) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-44) {
tmp = (60.0 * (x - y)) / (z - t);
} else if ((a * 120.0) <= 5e+128) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+37)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-44) then
tmp = (60.0d0 * (x - y)) / (z - t)
else if ((a * 120.0d0) <= 5d+128) then
tmp = (a * 120.0d0) + (x * (60.0d0 / z))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+37) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-44) {
tmp = (60.0 * (x - y)) / (z - t);
} else if ((a * 120.0) <= 5e+128) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+37: tmp = a * 120.0 elif (a * 120.0) <= 2e-44: tmp = (60.0 * (x - y)) / (z - t) elif (a * 120.0) <= 5e+128: tmp = (a * 120.0) + (x * (60.0 / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+37) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-44) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); elseif (Float64(a * 120.0) <= 5e+128) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+37) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-44) tmp = (60.0 * (x - y)) / (z - t); elseif ((a * 120.0) <= 5e+128) tmp = (a * 120.0) + (x * (60.0 / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+37], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-44], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+128], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+37}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-44}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+128}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999989e37 or 5e128 < (*.f64 a 120) Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.1%
if -4.99999999999999989e37 < (*.f64 a 120) < 1.99999999999999991e-44Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
associate-*r/81.0%
Applied egg-rr81.0%
if 1.99999999999999991e-44 < (*.f64 a 120) < 5e128Initial program 96.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 83.7%
associate-*r/80.7%
associate-*l/83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in z around inf 73.9%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -5e+37) (* a 120.0) (if (<= (* a 120.0) 2e+16) (* 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) <= -5e+37) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e+16) {
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) <= (-5d+37)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d+16) 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) <= -5e+37) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e+16) {
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) <= -5e+37: tmp = a * 120.0 elif (a * 120.0) <= 2e+16: 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) <= -5e+37) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e+16) 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) <= -5e+37) tmp = a * 120.0; elseif ((a * 120.0) <= 2e+16) 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], -5e+37], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+16], 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 -5 \cdot 10^{+37}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+16}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999989e37 or 2e16 < (*.f64 a 120) Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 78.6%
if -4.99999999999999989e37 < (*.f64 a 120) < 2e16Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -1.22e+23)
(* a 120.0)
(if (<= a -1.3e-105)
t_1
(if (<= a 1.9e-296)
(* 60.0 (/ x (- z t)))
(if (<= a 6e-51) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.22e+23) {
tmp = a * 120.0;
} else if (a <= -1.3e-105) {
tmp = t_1;
} else if (a <= 1.9e-296) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 6e-51) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (a <= (-1.22d+23)) then
tmp = a * 120.0d0
else if (a <= (-1.3d-105)) then
tmp = t_1
else if (a <= 1.9d-296) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 6d-51) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.22e+23) {
tmp = a * 120.0;
} else if (a <= -1.3e-105) {
tmp = t_1;
} else if (a <= 1.9e-296) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 6e-51) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -1.22e+23: tmp = a * 120.0 elif a <= -1.3e-105: tmp = t_1 elif a <= 1.9e-296: tmp = 60.0 * (x / (z - t)) elif a <= 6e-51: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -1.22e+23) tmp = Float64(a * 120.0); elseif (a <= -1.3e-105) tmp = t_1; elseif (a <= 1.9e-296) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 6e-51) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -1.22e+23) tmp = a * 120.0; elseif (a <= -1.3e-105) tmp = t_1; elseif (a <= 1.9e-296) tmp = 60.0 * (x / (z - t)); elseif (a <= 6e-51) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.22e+23], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.3e-105], t$95$1, If[LessEqual[a, 1.9e-296], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e-51], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -1.22 \cdot 10^{+23}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.3 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-296}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.22e23 or 6.00000000000000005e-51 < a Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.2%
if -1.22e23 < a < -1.2999999999999999e-105 or 1.9000000000000001e-296 < a < 6.00000000000000005e-51Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.1%
Taylor expanded in x around 0 52.4%
if -1.2999999999999999e-105 < a < 1.9000000000000001e-296Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.5%
Taylor expanded in x around inf 50.6%
Final simplification63.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.6e+95) (not (<= x 1.8e-12))) (+ (* a 120.0) (* x (/ 60.0 (- z t)))) (+ (* a 120.0) (/ -60.0 (/ (- z t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.6e+95) || !(x <= 1.8e-12)) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-5.6d+95)) .or. (.not. (x <= 1.8d-12))) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.6e+95) || !(x <= 1.8e-12)) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5.6e+95) or not (x <= 1.8e-12): tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5.6e+95) || !(x <= 1.8e-12)) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -5.6e+95) || ~((x <= 1.8e-12))) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5.6e+95], N[Not[LessEqual[x, 1.8e-12]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{+95} \lor \neg \left(x \leq 1.8 \cdot 10^{-12}\right):\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if x < -5.5999999999999995e95 or 1.8e-12 < x Initial program 97.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 85.4%
associate-*r/84.6%
associate-*l/85.5%
*-commutative85.5%
Simplified85.5%
if -5.5999999999999995e95 < x < 1.8e-12Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 95.7%
associate-*r/95.8%
associate-/l*95.7%
Simplified95.7%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2950000.0)
(+ (* a 120.0) (/ (* x -60.0) t))
(if (<= t 2.8e+44)
(+ (* a 120.0) (* 60.0 (/ (- x y) z)))
(+ (* a 120.0) (* x (/ -60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2950000.0) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (t <= 2.8e+44) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else {
tmp = (a * 120.0) + (x * (-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 <= (-2950000.0d0)) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
else if (t <= 2.8d+44) then
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
else
tmp = (a * 120.0d0) + (x * ((-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 <= -2950000.0) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (t <= 2.8e+44) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2950000.0: tmp = (a * 120.0) + ((x * -60.0) / t) elif t <= 2.8e+44: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2950000.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); elseif (t <= 2.8e+44) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2950000.0) tmp = (a * 120.0) + ((x * -60.0) / t); elseif (t <= 2.8e+44) tmp = (a * 120.0) + (60.0 * ((x - y) / z)); else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2950000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+44], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2950000:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+44}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if t < -2.95e6Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 82.7%
associate-*r/82.8%
*-commutative82.8%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in z around 0 81.1%
*-commutative81.1%
associate-*l/81.1%
Simplified81.1%
if -2.95e6 < t < 2.8000000000000001e44Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 84.2%
if 2.8000000000000001e44 < t Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 75.9%
associate-*r/75.9%
associate-*l/75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in z around 0 76.0%
Final simplification81.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1750000.0)
(+ (* a 120.0) (/ (* x -60.0) t))
(if (<= t 5.5e+41)
(+ (* a 120.0) (* (- x y) (/ 60.0 z)))
(+ (* a 120.0) (* x (/ -60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1750000.0) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (t <= 5.5e+41) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + (x * (-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 <= (-1750000.0d0)) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
else if (t <= 5.5d+41) then
tmp = (a * 120.0d0) + ((x - y) * (60.0d0 / z))
else
tmp = (a * 120.0d0) + (x * ((-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 <= -1750000.0) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (t <= 5.5e+41) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1750000.0: tmp = (a * 120.0) + ((x * -60.0) / t) elif t <= 5.5e+41: tmp = (a * 120.0) + ((x - y) * (60.0 / z)) else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1750000.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); elseif (t <= 5.5e+41) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / z))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1750000.0) tmp = (a * 120.0) + ((x * -60.0) / t); elseif (t <= 5.5e+41) tmp = (a * 120.0) + ((x - y) * (60.0 / z)); else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1750000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+41], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1750000:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+41}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if t < -1.75e6Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 82.7%
associate-*r/82.8%
*-commutative82.8%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in z around 0 81.1%
*-commutative81.1%
associate-*l/81.1%
Simplified81.1%
if -1.75e6 < t < 5.5000000000000003e41Initial program 99.1%
+-commutative99.1%
fma-def99.2%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 84.3%
fma-udef84.3%
*-commutative84.3%
Applied egg-rr84.3%
if 5.5000000000000003e41 < t Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 75.9%
associate-*r/75.9%
associate-*l/75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in z around 0 76.0%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(if (<= x -2.55e+81)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(if (<= x 2.4e-12)
(+ (* a 120.0) (/ -60.0 (/ (- z t) y)))
(+ (* a 120.0) (/ x (/ (- z t) 60.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.55e+81) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else if (x <= 2.4e-12) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-2.55d+81)) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else if (x <= 2.4d-12) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
else
tmp = (a * 120.0d0) + (x / ((z - t) / 60.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.55e+81) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else if (x <= 2.4e-12) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.55e+81: tmp = (a * 120.0) + (x * (60.0 / (z - t))) elif x <= 2.4e-12: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) else: tmp = (a * 120.0) + (x / ((z - t) / 60.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.55e+81) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); elseif (x <= 2.4e-12) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) / 60.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.55e+81) tmp = (a * 120.0) + (x * (60.0 / (z - t))); elseif (x <= 2.4e-12) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); else tmp = (a * 120.0) + (x / ((z - t) / 60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.55e+81], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e-12], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{+81}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-12}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\frac{z - t}{60}}\\
\end{array}
\end{array}
if x < -2.5500000000000001e81Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 80.1%
associate-*r/80.1%
associate-*l/80.2%
*-commutative80.2%
Simplified80.2%
if -2.5500000000000001e81 < x < 2.39999999999999987e-12Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 95.7%
associate-*r/95.8%
associate-/l*95.7%
Simplified95.7%
if 2.39999999999999987e-12 < x Initial program 97.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.3%
associate-*r/87.0%
*-commutative87.0%
associate-/l*88.4%
Simplified88.4%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.4e+91)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(if (<= x 2.4e-12)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (/ x (/ (- z t) 60.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.4e+91) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else if (x <= 2.4e-12) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4.4d+91)) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else if (x <= 2.4d-12) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x / ((z - t) / 60.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.4e+91) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else if (x <= 2.4e-12) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.4e+91: tmp = (a * 120.0) + (x * (60.0 / (z - t))) elif x <= 2.4e-12: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x / ((z - t) / 60.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.4e+91) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); elseif (x <= 2.4e-12) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) / 60.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.4e+91) tmp = (a * 120.0) + (x * (60.0 / (z - t))); elseif (x <= 2.4e-12) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x / ((z - t) / 60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.4e+91], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e-12], 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[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{+91}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-12}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\frac{z - t}{60}}\\
\end{array}
\end{array}
if x < -4.39999999999999999e91Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 80.1%
associate-*r/80.1%
associate-*l/80.2%
*-commutative80.2%
Simplified80.2%
if -4.39999999999999999e91 < x < 2.39999999999999987e-12Initial program 99.8%
Taylor expanded in x around 0 95.8%
if 2.39999999999999987e-12 < x Initial program 97.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.3%
associate-*r/87.0%
*-commutative87.0%
associate-/l*88.4%
Simplified88.4%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (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) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.45e+23) (not (<= a 2.3e-51))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.45e+23) || !(a <= 2.3e-51)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (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 <= (-1.45d+23)) .or. (.not. (a <= 2.3d-51))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (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 <= -1.45e+23) || !(a <= 2.3e-51)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.45e+23) or not (a <= 2.3e-51): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.45e+23) || !(a <= 2.3e-51)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.45e+23) || ~((a <= 2.3e-51))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.45e+23], N[Not[LessEqual[a, 2.3e-51]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+23} \lor \neg \left(a \leq 2.3 \cdot 10^{-51}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -1.45000000000000006e23 or 2.30000000000000002e-51 < a Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.2%
if -1.45000000000000006e23 < a < 2.30000000000000002e-51Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.2%
Taylor expanded in x around 0 46.0%
Final simplification60.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.4e+23) (* a 120.0) (if (<= a 92000000000000.0) (* 60.0 (/ (- x y) z)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.4e+23) {
tmp = a * 120.0;
} else if (a <= 92000000000000.0) {
tmp = 60.0 * ((x - 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 (a <= (-7.4d+23)) then
tmp = a * 120.0d0
else if (a <= 92000000000000.0d0) then
tmp = 60.0d0 * ((x - 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 (a <= -7.4e+23) {
tmp = a * 120.0;
} else if (a <= 92000000000000.0) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.4e+23: tmp = a * 120.0 elif a <= 92000000000000.0: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.4e+23) tmp = Float64(a * 120.0); elseif (a <= 92000000000000.0) tmp = Float64(60.0 * Float64(Float64(x - 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 (a <= -7.4e+23) tmp = a * 120.0; elseif (a <= 92000000000000.0) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.4e+23], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 92000000000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.4 \cdot 10^{+23}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 92000000000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.40000000000000025e23 or 9.2e13 < a Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 78.6%
if -7.40000000000000025e23 < a < 9.2e13Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
Taylor expanded in z around inf 51.3%
Final simplification63.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.15e+198) (not (<= y 3.5e+135))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.15e+198) || !(y <= 3.5e+135)) {
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.15d+198)) .or. (.not. (y <= 3.5d+135))) 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.15e+198) || !(y <= 3.5e+135)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.15e+198) or not (y <= 3.5e+135): 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.15e+198) || !(y <= 3.5e+135)) 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.15e+198) || ~((y <= 3.5e+135))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.15e+198], N[Not[LessEqual[y, 3.5e+135]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+198} \lor \neg \left(y \leq 3.5 \cdot 10^{+135}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.15e198 or 3.5000000000000003e135 < y Initial program 97.9%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 80.6%
Taylor expanded in x around 0 79.6%
Taylor expanded in z around inf 56.2%
if -1.15e198 < y < 3.5000000000000003e135Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.8%
Final simplification53.6%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 45.5%
Final simplification45.5%
(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 2023215
(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)))