
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, (60.0 / ((z - t) / (x - y))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{\frac{z - t}{x - y}}\right)
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ (* x -60.0) t))))
(if (<= t -3.3e+81)
t_1
(if (<= t -4.5e-26)
(* (- x y) (/ 60.0 (- z t)))
(if (<= t 9.5e-57)
(+ (* a 120.0) (* 60.0 (/ (- x y) z)))
(if (<= t 3.4e+75)
(/ (/ (- x y) (- z t)) 0.016666666666666666)
t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + ((x * -60.0) / t);
double tmp;
if (t <= -3.3e+81) {
tmp = t_1;
} else if (t <= -4.5e-26) {
tmp = (x - y) * (60.0 / (z - t));
} else if (t <= 9.5e-57) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else if (t <= 3.4e+75) {
tmp = ((x - y) / (z - t)) / 0.016666666666666666;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + ((x * (-60.0d0)) / t)
if (t <= (-3.3d+81)) then
tmp = t_1
else if (t <= (-4.5d-26)) then
tmp = (x - y) * (60.0d0 / (z - t))
else if (t <= 9.5d-57) then
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
else if (t <= 3.4d+75) then
tmp = ((x - y) / (z - t)) / 0.016666666666666666d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + ((x * -60.0) / t);
double tmp;
if (t <= -3.3e+81) {
tmp = t_1;
} else if (t <= -4.5e-26) {
tmp = (x - y) * (60.0 / (z - t));
} else if (t <= 9.5e-57) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else if (t <= 3.4e+75) {
tmp = ((x - y) / (z - t)) / 0.016666666666666666;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + ((x * -60.0) / t) tmp = 0 if t <= -3.3e+81: tmp = t_1 elif t <= -4.5e-26: tmp = (x - y) * (60.0 / (z - t)) elif t <= 9.5e-57: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) elif t <= 3.4e+75: tmp = ((x - y) / (z - t)) / 0.016666666666666666 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)) tmp = 0.0 if (t <= -3.3e+81) tmp = t_1; elseif (t <= -4.5e-26) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (t <= 9.5e-57) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); elseif (t <= 3.4e+75) tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) / 0.016666666666666666); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + ((x * -60.0) / t); tmp = 0.0; if (t <= -3.3e+81) tmp = t_1; elseif (t <= -4.5e-26) tmp = (x - y) * (60.0 / (z - t)); elseif (t <= 9.5e-57) tmp = (a * 120.0) + (60.0 * ((x - y) / z)); elseif (t <= 3.4e+75) tmp = ((x - y) / (z - t)) / 0.016666666666666666; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+81], t$95$1, If[LessEqual[t, -4.5e-26], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-57], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+75], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] / 0.016666666666666666), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-26}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-57}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+75}:\\
\;\;\;\;\frac{\frac{x - y}{z - t}}{0.016666666666666666}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.3e81 or 3.40000000000000011e75 < t Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.4%
associate-*r/87.4%
Simplified87.4%
Taylor expanded in z around 0 84.4%
associate-*r/83.5%
*-commutative83.5%
Simplified83.5%
if -3.3e81 < t < -4.4999999999999999e-26Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 75.9%
*-commutative75.9%
associate-*l/75.9%
associate-*r/76.0%
Simplified76.0%
if -4.4999999999999999e-26 < t < 9.5000000000000005e-57Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 90.4%
if 9.5000000000000005e-57 < t < 3.40000000000000011e75Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 72.8%
*-commutative72.8%
associate-*l/72.8%
associate-*r/72.7%
Simplified72.7%
metadata-eval72.7%
associate-/r*72.7%
*-commutative72.7%
div-inv72.9%
associate-/r*72.9%
Applied egg-rr72.9%
Final simplification84.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e-23)
(+ (* a 120.0) (* y (/ -60.0 (- z t))))
(if (<= (* a 120.0) 2e-47)
(/ (* 60.0 (- x y)) (- z t))
(+ (* a 120.0) (* 60.0 (/ (- x y) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e-23) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else if ((a * 120.0) <= 2e-47) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d-23)) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
else if ((a * 120.0d0) <= 2d-47) then
tmp = (60.0d0 * (x - y)) / (z - t)
else
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
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-23) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else if ((a * 120.0) <= 2e-47) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e-23: tmp = (a * 120.0) + (y * (-60.0 / (z - t))) elif (a * 120.0) <= 2e-47: tmp = (60.0 * (x - y)) / (z - t) else: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e-23) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); elseif (Float64(a * 120.0) <= 2e-47) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e-23) tmp = (a * 120.0) + (y * (-60.0 / (z - t))); elseif ((a * 120.0) <= 2e-47) tmp = (60.0 * (x - y)) / (z - t); else tmp = (a * 120.0) + (60.0 * ((x - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-23], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-47], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-23}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-47}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.0000000000000002e-23Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.2%
associate-*r/89.2%
*-commutative89.2%
*-lft-identity89.2%
times-frac89.2%
/-rgt-identity89.2%
Simplified89.2%
if -5.0000000000000002e-23 < (*.f64 a #s(literal 120 binary64)) < 1.9999999999999999e-47Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 82.2%
associate-*r/82.3%
Simplified82.3%
if 1.9999999999999999e-47 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.1%
Final simplification83.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e+29)
(* a 120.0)
(if (<= (* a 120.0) 1e+67)
(/ (* 60.0 (- x y)) (- z t))
(+ (* a 120.0) (* -60.0 (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+29) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+67) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d+29)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d+67) then
tmp = (60.0d0 * (x - y)) / (z - t)
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+29) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+67) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e+29: tmp = a * 120.0 elif (a * 120.0) <= 1e+67: tmp = (60.0 * (x - y)) / (z - t) else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e+29) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e+67) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e+29) tmp = a * 120.0; elseif ((a * 120.0) <= 1e+67) tmp = (60.0 * (x - y)) / (z - t); else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+29], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+67], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+29}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+67}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999983e29Initial program 98.1%
*-commutative98.1%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 79.0%
if -1.99999999999999983e29 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999983e66Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 76.3%
associate-*r/76.4%
Simplified76.4%
if 9.99999999999999983e66 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 85.2%
Taylor expanded in x around 0 82.3%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+42)
(* a 120.0)
(if (<= (* a 120.0) 1e+67)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* -60.0 (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+42) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+67) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+42)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d+67) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
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+42) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+67) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+42: tmp = a * 120.0 elif (a * 120.0) <= 1e+67: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+42) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e+67) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+42) tmp = a * 120.0; elseif ((a * 120.0) <= 1e+67) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+42], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+67], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+42}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+67}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.00000000000000007e42Initial program 98.0%
*-commutative98.0%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 80.0%
if -5.00000000000000007e42 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999983e66Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 76.0%
if 9.99999999999999983e66 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 85.2%
Taylor expanded in x around 0 82.3%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.4e+40)
(* a 120.0)
(if (<= a 4.7e-260)
(* 60.0 (/ y (- t z)))
(if (<= a 5.1e+64) (/ 60.0 (/ (- z t) x)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+40) {
tmp = a * 120.0;
} else if (a <= 4.7e-260) {
tmp = 60.0 * (y / (t - z));
} else if (a <= 5.1e+64) {
tmp = 60.0 / ((z - t) / x);
} 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 <= (-1.4d+40)) then
tmp = a * 120.0d0
else if (a <= 4.7d-260) then
tmp = 60.0d0 * (y / (t - z))
else if (a <= 5.1d+64) then
tmp = 60.0d0 / ((z - t) / x)
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 <= -1.4e+40) {
tmp = a * 120.0;
} else if (a <= 4.7e-260) {
tmp = 60.0 * (y / (t - z));
} else if (a <= 5.1e+64) {
tmp = 60.0 / ((z - t) / x);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e+40: tmp = a * 120.0 elif a <= 4.7e-260: tmp = 60.0 * (y / (t - z)) elif a <= 5.1e+64: tmp = 60.0 / ((z - t) / x) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e+40) tmp = Float64(a * 120.0); elseif (a <= 4.7e-260) tmp = Float64(60.0 * Float64(y / Float64(t - z))); elseif (a <= 5.1e+64) tmp = Float64(60.0 / Float64(Float64(z - t) / x)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.4e+40) tmp = a * 120.0; elseif (a <= 4.7e-260) tmp = 60.0 * (y / (t - z)); elseif (a <= 5.1e+64) tmp = 60.0 / ((z - t) / x); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e+40], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.7e-260], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.1e+64], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+40}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-260}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{+64}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.4000000000000001e40 or 5.10000000000000024e64 < a Initial program 98.9%
*-commutative98.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 78.7%
if -1.4000000000000001e40 < a < 4.7e-260Initial program 99.6%
*-commutative99.6%
associate-/l*99.5%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 54.4%
if 4.7e-260 < a < 5.10000000000000024e64Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 52.7%
associate-*r/52.8%
clear-num52.6%
*-commutative52.6%
Applied egg-rr52.6%
associate-/r/52.6%
Simplified52.6%
associate-*l/52.8%
*-un-lft-identity52.8%
*-commutative52.8%
associate-*l/52.6%
associate-/r/52.8%
Applied egg-rr52.8%
Final simplification64.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -8.5e+39)
(* a 120.0)
(if (<= a 3.05e-266)
(* 60.0 (/ y (- t z)))
(if (<= a 5e+64) (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.5e+39) {
tmp = a * 120.0;
} else if (a <= 3.05e-266) {
tmp = 60.0 * (y / (t - z));
} else if (a <= 5e+64) {
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 (a <= (-8.5d+39)) then
tmp = a * 120.0d0
else if (a <= 3.05d-266) then
tmp = 60.0d0 * (y / (t - z))
else if (a <= 5d+64) 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 (a <= -8.5e+39) {
tmp = a * 120.0;
} else if (a <= 3.05e-266) {
tmp = 60.0 * (y / (t - z));
} else if (a <= 5e+64) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.5e+39: tmp = a * 120.0 elif a <= 3.05e-266: tmp = 60.0 * (y / (t - z)) elif a <= 5e+64: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.5e+39) tmp = Float64(a * 120.0); elseif (a <= 3.05e-266) tmp = Float64(60.0 * Float64(y / Float64(t - z))); elseif (a <= 5e+64) 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 (a <= -8.5e+39) tmp = a * 120.0; elseif (a <= 3.05e-266) tmp = 60.0 * (y / (t - z)); elseif (a <= 5e+64) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.5e+39], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.05e-266], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e+64], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+39}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.05 \cdot 10^{-266}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+64}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -8.49999999999999971e39 or 5e64 < a Initial program 98.9%
*-commutative98.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 78.7%
if -8.49999999999999971e39 < a < 3.05e-266Initial program 99.6%
*-commutative99.6%
associate-/l*99.5%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 54.4%
if 3.05e-266 < a < 5e64Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 52.7%
Final simplification64.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.25e+101) (not (<= x 1.12e-32))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x))) (+ (* a 120.0) (/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.25e+101) || !(x <= 1.12e-32)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-1.25d+101)) .or. (.not. (x <= 1.12d-32))) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.25e+101) || !(x <= 1.12e-32)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.25e+101) or not (x <= 1.12e-32): tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.25e+101) || !(x <= 1.12e-32)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.25e+101) || ~((x <= 1.12e-32))) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.25e+101], N[Not[LessEqual[x, 1.12e-32]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+101} \lor \neg \left(x \leq 1.12 \cdot 10^{-32}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if x < -1.24999999999999997e101 or 1.12e-32 < x Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 93.1%
if -1.24999999999999997e101 < x < 1.12e-32Initial program 99.8%
Taylor expanded in x around 0 92.6%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.8e+100) (not (<= x 2.3e-32))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x))) (+ (* a 120.0) (* y (/ -60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.8e+100) || !(x <= 2.3e-32)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-1.8d+100)) .or. (.not. (x <= 2.3d-32))) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.8e+100) || !(x <= 2.3e-32)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.8e+100) or not (x <= 2.3e-32): tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + (y * (-60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.8e+100) || !(x <= 2.3e-32)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.8e+100) || ~((x <= 2.3e-32))) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + (y * (-60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.8e+100], N[Not[LessEqual[x, 2.3e-32]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+100} \lor \neg \left(x \leq 2.3 \cdot 10^{-32}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\end{array}
\end{array}
if x < -1.8e100 or 2.3000000000000001e-32 < x Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 93.1%
if -1.8e100 < x < 2.3000000000000001e-32Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.6%
associate-*r/92.6%
*-commutative92.6%
*-lft-identity92.6%
times-frac92.6%
/-rgt-identity92.6%
Simplified92.6%
Final simplification92.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1e-36)
(* a 120.0)
(if (<= a 1.25e-270)
(* -60.0 (/ y z))
(if (<= a 1.1e-229) (* 60.0 (/ x z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1e-36) {
tmp = a * 120.0;
} else if (a <= 1.25e-270) {
tmp = -60.0 * (y / z);
} else if (a <= 1.1e-229) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1d-36)) then
tmp = a * 120.0d0
else if (a <= 1.25d-270) then
tmp = (-60.0d0) * (y / z)
else if (a <= 1.1d-229) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1e-36) {
tmp = a * 120.0;
} else if (a <= 1.25e-270) {
tmp = -60.0 * (y / z);
} else if (a <= 1.1e-229) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1e-36: tmp = a * 120.0 elif a <= 1.25e-270: tmp = -60.0 * (y / z) elif a <= 1.1e-229: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1e-36) tmp = Float64(a * 120.0); elseif (a <= 1.25e-270) tmp = Float64(-60.0 * Float64(y / z)); elseif (a <= 1.1e-229) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1e-36) tmp = a * 120.0; elseif (a <= 1.25e-270) tmp = -60.0 * (y / z); elseif (a <= 1.1e-229) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1e-36], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.25e-270], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-229], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-36}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-270}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-229}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -9.9999999999999994e-37 or 1.0999999999999999e-229 < a Initial program 99.3%
*-commutative99.3%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 60.2%
if -9.9999999999999994e-37 < a < 1.2499999999999999e-270Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 87.1%
*-commutative87.1%
associate-*l/87.1%
associate-*r/87.0%
Simplified87.0%
Taylor expanded in z around inf 48.0%
Taylor expanded in x around 0 37.8%
if 1.2499999999999999e-270 < a < 1.0999999999999999e-229Initial program 99.8%
associate-/l*99.5%
Simplified99.5%
+-commutative99.5%
fma-define99.5%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 69.3%
Taylor expanded in z around inf 50.1%
Final simplification54.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.4e-35)
(* a 120.0)
(if (<= a 2.2e-274)
(* -60.0 (/ y z))
(if (<= a 1.06e-213) (* -60.0 (/ x t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e-35) {
tmp = a * 120.0;
} else if (a <= 2.2e-274) {
tmp = -60.0 * (y / z);
} else if (a <= 1.06e-213) {
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 (a <= (-1.4d-35)) then
tmp = a * 120.0d0
else if (a <= 2.2d-274) then
tmp = (-60.0d0) * (y / z)
else if (a <= 1.06d-213) 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 (a <= -1.4e-35) {
tmp = a * 120.0;
} else if (a <= 2.2e-274) {
tmp = -60.0 * (y / z);
} else if (a <= 1.06e-213) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e-35: tmp = a * 120.0 elif a <= 2.2e-274: tmp = -60.0 * (y / z) elif a <= 1.06e-213: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e-35) tmp = Float64(a * 120.0); elseif (a <= 2.2e-274) tmp = Float64(-60.0 * Float64(y / z)); elseif (a <= 1.06e-213) 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 (a <= -1.4e-35) tmp = a * 120.0; elseif (a <= 2.2e-274) tmp = -60.0 * (y / z); elseif (a <= 1.06e-213) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e-35], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.2e-274], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.06e-213], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-35}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-274}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{-213}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.4e-35 or 1.06000000000000001e-213 < a Initial program 99.3%
*-commutative99.3%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 60.8%
if -1.4e-35 < a < 2.19999999999999995e-274Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 86.6%
*-commutative86.6%
associate-*l/86.6%
associate-*r/86.6%
Simplified86.6%
Taylor expanded in z around inf 49.5%
Taylor expanded in x around 0 39.0%
if 2.19999999999999995e-274 < a < 1.06000000000000001e-213Initial program 99.7%
associate-/l*99.4%
Simplified99.4%
+-commutative99.4%
fma-define99.4%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 70.8%
Taylor expanded in z around 0 35.3%
Final simplification54.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.5e+40) (not (<= a 5e+64))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e+40) || !(a <= 5e+64)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.5d+40)) .or. (.not. (a <= 5d+64))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e+40) || !(a <= 5e+64)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.5e+40) or not (a <= 5e+64): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.5e+40) || !(a <= 5e+64)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.5e+40) || ~((a <= 5e+64))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.5e+40], N[Not[LessEqual[a, 5e+64]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+40} \lor \neg \left(a \leq 5 \cdot 10^{+64}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -2.50000000000000002e40 or 5e64 < a Initial program 98.9%
*-commutative98.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 78.7%
if -2.50000000000000002e40 < a < 5e64Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 76.5%
Final simplification77.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.45e-25) (not (<= a 5e+64))) (* a 120.0) (* 60.0 (/ x (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.45e-25) || !(a <= 5e+64)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.45d-25)) .or. (.not. (a <= 5d+64))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.45e-25) || !(a <= 5e+64)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.45e-25) or not (a <= 5e+64): tmp = a * 120.0 else: tmp = 60.0 * (x / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.45e-25) || !(a <= 5e+64)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.45e-25) || ~((a <= 5e+64))) tmp = a * 120.0; else tmp = 60.0 * (x / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.45e-25], N[Not[LessEqual[a, 5e+64]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-25} \lor \neg \left(a \leq 5 \cdot 10^{+64}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if a < -1.45e-25 or 5e64 < a Initial program 99.0%
*-commutative99.0%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 75.6%
if -1.45e-25 < a < 5e64Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 44.8%
Final simplification58.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.5e-26) (not (<= a 1e-213))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.5e-26) || !(a <= 1e-213)) {
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 ((a <= (-8.5d-26)) .or. (.not. (a <= 1d-213))) 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 ((a <= -8.5e-26) || !(a <= 1e-213)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.5e-26) or not (a <= 1e-213): tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.5e-26) || !(a <= 1e-213)) 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 ((a <= -8.5e-26) || ~((a <= 1e-213))) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.5e-26], N[Not[LessEqual[a, 1e-213]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{-26} \lor \neg \left(a \leq 10^{-213}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -8.50000000000000004e-26 or 9.9999999999999995e-214 < a Initial program 99.3%
*-commutative99.3%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 61.4%
if -8.50000000000000004e-26 < a < 9.9999999999999995e-214Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
+-commutative99.5%
fma-define99.5%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 43.0%
Taylor expanded in z around 0 26.2%
Final simplification51.2%
(FPCore (x y z t a) :precision binary64 (if (<= x -7.6e+233) (/ (* 60.0 x) z) (if (<= x 2.2e+243) (* a 120.0) (/ -60.0 (/ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.6e+233) {
tmp = (60.0 * x) / z;
} else if (x <= 2.2e+243) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (t / 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 (x <= (-7.6d+233)) then
tmp = (60.0d0 * x) / z
else if (x <= 2.2d+243) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) / (t / x)
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.6e+233) {
tmp = (60.0 * x) / z;
} else if (x <= 2.2e+243) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (t / x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -7.6e+233: tmp = (60.0 * x) / z elif x <= 2.2e+243: tmp = a * 120.0 else: tmp = -60.0 / (t / x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -7.6e+233) tmp = Float64(Float64(60.0 * x) / z); elseif (x <= 2.2e+243) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 / Float64(t / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -7.6e+233) tmp = (60.0 * x) / z; elseif (x <= 2.2e+243) tmp = a * 120.0; else tmp = -60.0 / (t / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -7.6e+233], N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 2.2e+243], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.6 \cdot 10^{+233}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+243}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\end{array}
\end{array}
if x < -7.5999999999999997e233Initial program 96.1%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 77.5%
Taylor expanded in z around inf 53.2%
associate-*r/53.4%
*-commutative53.4%
Simplified53.4%
if -7.5999999999999997e233 < x < 2.20000000000000009e243Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 52.3%
if 2.20000000000000009e243 < x Initial program 99.8%
associate-/l*99.5%
Simplified99.5%
+-commutative99.5%
fma-define99.6%
clear-num99.6%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 77.4%
Taylor expanded in z around 0 64.0%
clear-num63.9%
un-div-inv64.1%
Applied egg-rr64.1%
Final simplification53.1%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 46.9%
Final simplification46.9%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024191
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))