
(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 14 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.4%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ x (- t z)))) (t_2 (* 60.0 (/ y (- t z)))))
(if (<= a -4e-75)
(* a 120.0)
(if (<= a -2.75e-210)
t_2
(if (<= a -2e-219)
t_1
(if (<= a 7.8e-274)
t_2
(if (<= a 1.15e-222) t_1 (if (<= a 3e+20) t_2 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / (t - z));
double t_2 = 60.0 * (y / (t - z));
double tmp;
if (a <= -4e-75) {
tmp = a * 120.0;
} else if (a <= -2.75e-210) {
tmp = t_2;
} else if (a <= -2e-219) {
tmp = t_1;
} else if (a <= 7.8e-274) {
tmp = t_2;
} else if (a <= 1.15e-222) {
tmp = t_1;
} else if (a <= 3e+20) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (x / (t - z))
t_2 = 60.0d0 * (y / (t - z))
if (a <= (-4d-75)) then
tmp = a * 120.0d0
else if (a <= (-2.75d-210)) then
tmp = t_2
else if (a <= (-2d-219)) then
tmp = t_1
else if (a <= 7.8d-274) then
tmp = t_2
else if (a <= 1.15d-222) then
tmp = t_1
else if (a <= 3d+20) then
tmp = t_2
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 * (x / (t - z));
double t_2 = 60.0 * (y / (t - z));
double tmp;
if (a <= -4e-75) {
tmp = a * 120.0;
} else if (a <= -2.75e-210) {
tmp = t_2;
} else if (a <= -2e-219) {
tmp = t_1;
} else if (a <= 7.8e-274) {
tmp = t_2;
} else if (a <= 1.15e-222) {
tmp = t_1;
} else if (a <= 3e+20) {
tmp = t_2;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (x / (t - z)) t_2 = 60.0 * (y / (t - z)) tmp = 0 if a <= -4e-75: tmp = a * 120.0 elif a <= -2.75e-210: tmp = t_2 elif a <= -2e-219: tmp = t_1 elif a <= 7.8e-274: tmp = t_2 elif a <= 1.15e-222: tmp = t_1 elif a <= 3e+20: tmp = t_2 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(x / Float64(t - z))) t_2 = Float64(60.0 * Float64(y / Float64(t - z))) tmp = 0.0 if (a <= -4e-75) tmp = Float64(a * 120.0); elseif (a <= -2.75e-210) tmp = t_2; elseif (a <= -2e-219) tmp = t_1; elseif (a <= 7.8e-274) tmp = t_2; elseif (a <= 1.15e-222) tmp = t_1; elseif (a <= 3e+20) tmp = t_2; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (x / (t - z)); t_2 = 60.0 * (y / (t - z)); tmp = 0.0; if (a <= -4e-75) tmp = a * 120.0; elseif (a <= -2.75e-210) tmp = t_2; elseif (a <= -2e-219) tmp = t_1; elseif (a <= 7.8e-274) tmp = t_2; elseif (a <= 1.15e-222) tmp = t_1; elseif (a <= 3e+20) tmp = t_2; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4e-75], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.75e-210], t$95$2, If[LessEqual[a, -2e-219], t$95$1, If[LessEqual[a, 7.8e-274], t$95$2, If[LessEqual[a, 1.15e-222], t$95$1, If[LessEqual[a, 3e+20], t$95$2, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t - z}\\
t_2 := 60 \cdot \frac{y}{t - z}\\
\mathbf{if}\;a \leq -4 \cdot 10^{-75}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.75 \cdot 10^{-210}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-222}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.9999999999999998e-75 or 3e20 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.3%
if -3.9999999999999998e-75 < a < -2.75000000000000012e-210 or -2.0000000000000001e-219 < a < 7.79999999999999971e-274 or 1.1500000000000001e-222 < a < 3e20Initial program 98.7%
*-commutative98.7%
associate-/l*99.6%
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 55.5%
if -2.75000000000000012e-210 < a < -2.0000000000000001e-219 or 7.79999999999999971e-274 < a < 1.1500000000000001e-222Initial program 99.5%
*-commutative99.5%
associate-/l*99.6%
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 x around inf 88.4%
Final simplification67.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ x (- t z)))) (t_2 (* 60.0 (/ y (- t z)))))
(if (<= a -2.65e-73)
(* a 120.0)
(if (<= a -2.7e-210)
t_2
(if (<= a -2.1e-219)
t_1
(if (<= a 1.1e-275)
(/ (* 60.0 y) (- t z))
(if (<= a 4.8e-225) t_1 (if (<= a 4.5e+20) t_2 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / (t - z));
double t_2 = 60.0 * (y / (t - z));
double tmp;
if (a <= -2.65e-73) {
tmp = a * 120.0;
} else if (a <= -2.7e-210) {
tmp = t_2;
} else if (a <= -2.1e-219) {
tmp = t_1;
} else if (a <= 1.1e-275) {
tmp = (60.0 * y) / (t - z);
} else if (a <= 4.8e-225) {
tmp = t_1;
} else if (a <= 4.5e+20) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (x / (t - z))
t_2 = 60.0d0 * (y / (t - z))
if (a <= (-2.65d-73)) then
tmp = a * 120.0d0
else if (a <= (-2.7d-210)) then
tmp = t_2
else if (a <= (-2.1d-219)) then
tmp = t_1
else if (a <= 1.1d-275) then
tmp = (60.0d0 * y) / (t - z)
else if (a <= 4.8d-225) then
tmp = t_1
else if (a <= 4.5d+20) then
tmp = t_2
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 * (x / (t - z));
double t_2 = 60.0 * (y / (t - z));
double tmp;
if (a <= -2.65e-73) {
tmp = a * 120.0;
} else if (a <= -2.7e-210) {
tmp = t_2;
} else if (a <= -2.1e-219) {
tmp = t_1;
} else if (a <= 1.1e-275) {
tmp = (60.0 * y) / (t - z);
} else if (a <= 4.8e-225) {
tmp = t_1;
} else if (a <= 4.5e+20) {
tmp = t_2;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (x / (t - z)) t_2 = 60.0 * (y / (t - z)) tmp = 0 if a <= -2.65e-73: tmp = a * 120.0 elif a <= -2.7e-210: tmp = t_2 elif a <= -2.1e-219: tmp = t_1 elif a <= 1.1e-275: tmp = (60.0 * y) / (t - z) elif a <= 4.8e-225: tmp = t_1 elif a <= 4.5e+20: tmp = t_2 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(x / Float64(t - z))) t_2 = Float64(60.0 * Float64(y / Float64(t - z))) tmp = 0.0 if (a <= -2.65e-73) tmp = Float64(a * 120.0); elseif (a <= -2.7e-210) tmp = t_2; elseif (a <= -2.1e-219) tmp = t_1; elseif (a <= 1.1e-275) tmp = Float64(Float64(60.0 * y) / Float64(t - z)); elseif (a <= 4.8e-225) tmp = t_1; elseif (a <= 4.5e+20) tmp = t_2; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (x / (t - z)); t_2 = 60.0 * (y / (t - z)); tmp = 0.0; if (a <= -2.65e-73) tmp = a * 120.0; elseif (a <= -2.7e-210) tmp = t_2; elseif (a <= -2.1e-219) tmp = t_1; elseif (a <= 1.1e-275) tmp = (60.0 * y) / (t - z); elseif (a <= 4.8e-225) tmp = t_1; elseif (a <= 4.5e+20) tmp = t_2; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.65e-73], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.7e-210], t$95$2, If[LessEqual[a, -2.1e-219], t$95$1, If[LessEqual[a, 1.1e-275], N[(N[(60.0 * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e-225], t$95$1, If[LessEqual[a, 4.5e+20], t$95$2, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t - z}\\
t_2 := 60 \cdot \frac{y}{t - z}\\
\mathbf{if}\;a \leq -2.65 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-210}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-275}:\\
\;\;\;\;\frac{60 \cdot y}{t - z}\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.64999999999999986e-73 or 4.5e20 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.3%
if -2.64999999999999986e-73 < a < -2.69999999999999992e-210 or 4.79999999999999992e-225 < a < 4.5e20Initial program 99.7%
*-commutative99.7%
associate-/l*99.6%
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 55.0%
if -2.69999999999999992e-210 < a < -2.1e-219 or 1.09999999999999994e-275 < a < 4.79999999999999992e-225Initial program 99.5%
*-commutative99.5%
associate-/l*99.6%
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 x around inf 88.4%
if -2.1e-219 < a < 1.09999999999999994e-275Initial program 95.0%
*-commutative95.0%
associate-/l*99.6%
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 56.9%
associate-*r/56.9%
Simplified56.9%
Final simplification67.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.8e-78)
(* a 120.0)
(if (<= a 1.5e-222)
(/ (- x y) (* z 0.016666666666666666))
(if (or (<= a 1.4e+21) (and (not (<= a 1.02e+131)) (<= a 3.6e+135)))
(* 60.0 (/ y (- t z)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.8e-78) {
tmp = a * 120.0;
} else if (a <= 1.5e-222) {
tmp = (x - y) / (z * 0.016666666666666666);
} else if ((a <= 1.4e+21) || (!(a <= 1.02e+131) && (a <= 3.6e+135))) {
tmp = 60.0 * (y / (t - 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 <= (-4.8d-78)) then
tmp = a * 120.0d0
else if (a <= 1.5d-222) then
tmp = (x - y) / (z * 0.016666666666666666d0)
else if ((a <= 1.4d+21) .or. (.not. (a <= 1.02d+131)) .and. (a <= 3.6d+135)) then
tmp = 60.0d0 * (y / (t - 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 <= -4.8e-78) {
tmp = a * 120.0;
} else if (a <= 1.5e-222) {
tmp = (x - y) / (z * 0.016666666666666666);
} else if ((a <= 1.4e+21) || (!(a <= 1.02e+131) && (a <= 3.6e+135))) {
tmp = 60.0 * (y / (t - z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.8e-78: tmp = a * 120.0 elif a <= 1.5e-222: tmp = (x - y) / (z * 0.016666666666666666) elif (a <= 1.4e+21) or (not (a <= 1.02e+131) and (a <= 3.6e+135)): tmp = 60.0 * (y / (t - z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.8e-78) tmp = Float64(a * 120.0); elseif (a <= 1.5e-222) tmp = Float64(Float64(x - y) / Float64(z * 0.016666666666666666)); elseif ((a <= 1.4e+21) || (!(a <= 1.02e+131) && (a <= 3.6e+135))) tmp = Float64(60.0 * Float64(y / Float64(t - 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 <= -4.8e-78) tmp = a * 120.0; elseif (a <= 1.5e-222) tmp = (x - y) / (z * 0.016666666666666666); elseif ((a <= 1.4e+21) || (~((a <= 1.02e+131)) && (a <= 3.6e+135))) tmp = 60.0 * (y / (t - z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.8e-78], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.5e-222], N[(N[(x - y), $MachinePrecision] / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 1.4e+21], And[N[Not[LessEqual[a, 1.02e+131]], $MachinePrecision], LessEqual[a, 3.6e+135]]], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{-78}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-222}:\\
\;\;\;\;\frac{x - y}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+21} \lor \neg \left(a \leq 1.02 \cdot 10^{+131}\right) \land a \leq 3.6 \cdot 10^{+135}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.79999999999999999e-78 or 1.4e21 < a < 1.0199999999999999e131 or 3.5999999999999998e135 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.2%
if -4.79999999999999999e-78 < a < 1.50000000000000015e-222Initial program 98.1%
*-commutative98.1%
associate-/l*99.6%
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 a around 0 86.0%
*-commutative86.0%
metadata-eval86.0%
times-frac85.9%
*-rgt-identity85.9%
Simplified85.9%
Taylor expanded in t around 0 53.7%
*-commutative53.7%
Simplified53.7%
if 1.50000000000000015e-222 < a < 1.4e21 or 1.0199999999999999e131 < a < 3.5999999999999998e135Initial program 99.7%
*-commutative99.7%
associate-/l*99.6%
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 56.2%
Final simplification65.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -8.2e+171) (not (<= x 2.3e+83))) (+ (/ 60.0 (/ (- z t) x)) (* a 120.0)) (+ (* 60.0 (/ y (- t z))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -8.2e+171) || !(x <= 2.3e+83)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-8.2d+171)) .or. (.not. (x <= 2.3d+83))) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else
tmp = (60.0d0 * (y / (t - z))) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -8.2e+171) || !(x <= 2.3e+83)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -8.2e+171) or not (x <= 2.3e+83): tmp = (60.0 / ((z - t) / x)) + (a * 120.0) else: tmp = (60.0 * (y / (t - z))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -8.2e+171) || !(x <= 2.3e+83)) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 * Float64(y / Float64(t - z))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -8.2e+171) || ~((x <= 2.3e+83))) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); else tmp = (60.0 * (y / (t - z))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -8.2e+171], N[Not[LessEqual[x, 2.3e+83]], $MachinePrecision]], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+171} \lor \neg \left(x \leq 2.3 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t - z} + a \cdot 120\\
\end{array}
\end{array}
if x < -8.1999999999999992e171 or 2.29999999999999995e83 < x Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 92.6%
if -8.1999999999999992e171 < x < 2.29999999999999995e83Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
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 x around 0 91.5%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -6e+197)
(/ (- x y) (* (- t z) -0.016666666666666666))
(if (<= x 4.2e+24)
(+ (* 60.0 (/ y (- t z))) (* a 120.0))
(* -60.0 (/ (- x y) (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6e+197) {
tmp = (x - y) / ((t - z) * -0.016666666666666666);
} else if (x <= 4.2e+24) {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
} else {
tmp = -60.0 * ((x - y) / (t - 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 (x <= (-6d+197)) then
tmp = (x - y) / ((t - z) * (-0.016666666666666666d0))
else if (x <= 4.2d+24) then
tmp = (60.0d0 * (y / (t - z))) + (a * 120.0d0)
else
tmp = (-60.0d0) * ((x - y) / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6e+197) {
tmp = (x - y) / ((t - z) * -0.016666666666666666);
} else if (x <= 4.2e+24) {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
} else {
tmp = -60.0 * ((x - y) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6e+197: tmp = (x - y) / ((t - z) * -0.016666666666666666) elif x <= 4.2e+24: tmp = (60.0 * (y / (t - z))) + (a * 120.0) else: tmp = -60.0 * ((x - y) / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6e+197) tmp = Float64(Float64(x - y) / Float64(Float64(t - z) * -0.016666666666666666)); elseif (x <= 4.2e+24) tmp = Float64(Float64(60.0 * Float64(y / Float64(t - z))) + Float64(a * 120.0)); else tmp = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6e+197) tmp = (x - y) / ((t - z) * -0.016666666666666666); elseif (x <= 4.2e+24) tmp = (60.0 * (y / (t - z))) + (a * 120.0); else tmp = -60.0 * ((x - y) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6e+197], N[(N[(x - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] * -0.016666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e+24], N[(N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{+197}:\\
\;\;\;\;\frac{x - y}{\left(t - z\right) \cdot -0.016666666666666666}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+24}:\\
\;\;\;\;60 \cdot \frac{y}{t - z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t - z}\\
\end{array}
\end{array}
if x < -6.0000000000000004e197Initial program 96.0%
*-commutative96.0%
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 a around 0 83.4%
*-commutative83.4%
metadata-eval83.4%
times-frac83.4%
*-rgt-identity83.4%
Simplified83.4%
if -6.0000000000000004e197 < x < 4.2000000000000003e24Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
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 x around 0 93.2%
if 4.2000000000000003e24 < x Initial program 99.8%
*-commutative99.8%
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 a around 0 67.5%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -8.2e+171)
(+ (/ 60.0 (/ (- z t) x)) (* a 120.0))
(if (<= x 3.05e+82)
(+ (* 60.0 (/ y (- t z))) (* a 120.0))
(+ (* a 120.0) (/ (* 60.0 x) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8.2e+171) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else if (x <= 3.05e+82) {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
} else {
tmp = (a * 120.0) + ((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 (x <= (-8.2d+171)) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else if (x <= 3.05d+82) then
tmp = (60.0d0 * (y / (t - z))) + (a * 120.0d0)
else
tmp = (a * 120.0d0) + ((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 (x <= -8.2e+171) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else if (x <= 3.05e+82) {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
} else {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -8.2e+171: tmp = (60.0 / ((z - t) / x)) + (a * 120.0) elif x <= 3.05e+82: tmp = (60.0 * (y / (t - z))) + (a * 120.0) else: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -8.2e+171) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); elseif (x <= 3.05e+82) tmp = Float64(Float64(60.0 * Float64(y / Float64(t - z))) + Float64(a * 120.0)); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -8.2e+171) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); elseif (x <= 3.05e+82) tmp = (60.0 * (y / (t - z))) + (a * 120.0); else tmp = (a * 120.0) + ((60.0 * x) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8.2e+171], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.05e+82], N[(N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+171}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{elif}\;x \leq 3.05 \cdot 10^{+82}:\\
\;\;\;\;60 \cdot \frac{y}{t - z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\end{array}
\end{array}
if x < -8.1999999999999992e171Initial program 96.5%
associate-/l*99.7%
Simplified99.7%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 99.8%
if -8.1999999999999992e171 < x < 3.0499999999999999e82Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
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 x around 0 91.5%
if 3.0499999999999999e82 < x Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.1%
associate-*r/87.1%
Simplified87.1%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.2e-42) (not (<= a 6.8e+66))) (* a 120.0) (* -60.0 (/ (- x y) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.2e-42) || !(a <= 6.8e+66)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / (t - 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 <= (-4.2d-42)) .or. (.not. (a <= 6.8d+66))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / (t - 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 <= -4.2e-42) || !(a <= 6.8e+66)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.2e-42) or not (a <= 6.8e+66): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.2e-42) || !(a <= 6.8e+66)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.2e-42) || ~((a <= 6.8e+66))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.2e-42], N[Not[LessEqual[a, 6.8e+66]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{-42} \lor \neg \left(a \leq 6.8 \cdot 10^{+66}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t - z}\\
\end{array}
\end{array}
if a < -4.20000000000000013e-42 or 6.8000000000000006e66 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.8%
if -4.20000000000000013e-42 < a < 6.8000000000000006e66Initial program 99.0%
*-commutative99.0%
associate-/l*99.6%
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 a around 0 77.4%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.15e+199) (not (<= x 3.8e+32))) (* -60.0 (/ x (- t z))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.15e+199) || !(x <= 3.8e+32)) {
tmp = -60.0 * (x / (t - 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 ((x <= (-3.15d+199)) .or. (.not. (x <= 3.8d+32))) then
tmp = (-60.0d0) * (x / (t - 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 ((x <= -3.15e+199) || !(x <= 3.8e+32)) {
tmp = -60.0 * (x / (t - z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.15e+199) or not (x <= 3.8e+32): tmp = -60.0 * (x / (t - z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3.15e+199) || !(x <= 3.8e+32)) tmp = Float64(-60.0 * Float64(x / Float64(t - z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3.15e+199) || ~((x <= 3.8e+32))) tmp = -60.0 * (x / (t - z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3.15e+199], N[Not[LessEqual[x, 3.8e+32]], $MachinePrecision]], N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.15 \cdot 10^{+199} \lor \neg \left(x \leq 3.8 \cdot 10^{+32}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -3.15e199 or 3.8000000000000003e32 < x Initial program 98.6%
*-commutative98.6%
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 x around inf 58.6%
if -3.15e199 < x < 3.8000000000000003e32Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.3%
Final simplification59.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e-146) (not (<= a 7.8e-148))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-146) || !(a <= 7.8e-148)) {
tmp = a * 120.0;
} else {
tmp = -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 <= (-5.5d-146)) .or. (.not. (a <= 7.8d-148))) then
tmp = a * 120.0d0
else
tmp = (-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 <= -5.5e-146) || !(a <= 7.8e-148)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e-146) or not (a <= 7.8e-148): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e-146) || !(a <= 7.8e-148)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.5e-146) || ~((a <= 7.8e-148))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e-146], N[Not[LessEqual[a, 7.8e-148]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-146} \lor \neg \left(a \leq 7.8 \cdot 10^{-148}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -5.49999999999999998e-146 or 7.79999999999999988e-148 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.2%
if -5.49999999999999998e-146 < a < 7.79999999999999988e-148Initial program 98.2%
*-commutative98.2%
associate-/l*99.6%
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 53.3%
associate-*r/53.3%
Simplified53.3%
Taylor expanded in t around 0 29.4%
Final simplification54.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e-146) (not (<= a 2.95e-149))) (* a 120.0) (/ (* y -60.0) z)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-146) || !(a <= 2.95e-149)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / 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 <= (-5.5d-146)) .or. (.not. (a <= 2.95d-149))) then
tmp = a * 120.0d0
else
tmp = (y * (-60.0d0)) / 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 <= -5.5e-146) || !(a <= 2.95e-149)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e-146) or not (a <= 2.95e-149): tmp = a * 120.0 else: tmp = (y * -60.0) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e-146) || !(a <= 2.95e-149)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.5e-146) || ~((a <= 2.95e-149))) tmp = a * 120.0; else tmp = (y * -60.0) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e-146], N[Not[LessEqual[a, 2.95e-149]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-146} \lor \neg \left(a \leq 2.95 \cdot 10^{-149}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if a < -5.49999999999999998e-146 or 2.9500000000000001e-149 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.2%
if -5.49999999999999998e-146 < a < 2.9500000000000001e-149Initial program 98.2%
*-commutative98.2%
associate-/l*99.6%
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 53.3%
associate-*r/53.3%
Simplified53.3%
Taylor expanded in t around 0 29.4%
associate-*r/29.5%
Simplified29.5%
Final simplification54.4%
(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(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.1e+198) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.1e+198) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.1d+198)) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.1e+198) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.1e+198: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.1e+198) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.1e+198) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.1e+198], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+198}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.1e198Initial program 96.0%
*-commutative96.0%
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 a around 0 83.4%
*-commutative83.4%
metadata-eval83.4%
times-frac83.4%
*-rgt-identity83.4%
Simplified83.4%
Taylor expanded in t around inf 45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in x around inf 45.9%
if -1.1e198 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 53.4%
Final simplification52.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%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 50.0%
Final simplification50.0%
(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 2024089
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))