
(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 19 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 (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) * (60.0 / (z - t))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\end{array}
Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
+-commutative99.8%
fma-define99.8%
associate-/r/99.8%
div-inv99.7%
*-commutative99.7%
div-inv99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) z))))
(if (<= a -2.3e-38)
(* a 120.0)
(if (<= a -6.2e-103)
t_1
(if (<= a 9e-100)
(* 60.0 (/ (- y x) t))
(if (<= a 1.9e-75) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double tmp;
if (a <= -2.3e-38) {
tmp = a * 120.0;
} else if (a <= -6.2e-103) {
tmp = t_1;
} else if (a <= 9e-100) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 1.9e-75) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / z)
if (a <= (-2.3d-38)) then
tmp = a * 120.0d0
else if (a <= (-6.2d-103)) then
tmp = t_1
else if (a <= 9d-100) then
tmp = 60.0d0 * ((y - x) / t)
else if (a <= 1.9d-75) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double tmp;
if (a <= -2.3e-38) {
tmp = a * 120.0;
} else if (a <= -6.2e-103) {
tmp = t_1;
} else if (a <= 9e-100) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 1.9e-75) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / z) tmp = 0 if a <= -2.3e-38: tmp = a * 120.0 elif a <= -6.2e-103: tmp = t_1 elif a <= 9e-100: tmp = 60.0 * ((y - x) / t) elif a <= 1.9e-75: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / z)) tmp = 0.0 if (a <= -2.3e-38) tmp = Float64(a * 120.0); elseif (a <= -6.2e-103) tmp = t_1; elseif (a <= 9e-100) tmp = Float64(60.0 * Float64(Float64(y - x) / t)); elseif (a <= 1.9e-75) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / z); tmp = 0.0; if (a <= -2.3e-38) tmp = a * 120.0; elseif (a <= -6.2e-103) tmp = t_1; elseif (a <= 9e-100) tmp = 60.0 * ((y - x) / t); elseif (a <= 1.9e-75) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e-38], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.2e-103], t$95$1, If[LessEqual[a, 9e-100], N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e-75], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{-38}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6.2 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-100}:\\
\;\;\;\;60 \cdot \frac{y - x}{t}\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.30000000000000002e-38 or 1.89999999999999997e-75 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 70.7%
if -2.30000000000000002e-38 < a < -6.2000000000000003e-103 or 9.0000000000000002e-100 < a < 1.89999999999999997e-75Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 79.0%
if -6.2000000000000003e-103 < a < 9.0000000000000002e-100Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 79.9%
Taylor expanded in z around 0 49.0%
associate-*r/60.0%
neg-mul-160.0%
neg-sub060.0%
sub-neg60.0%
+-commutative60.0%
associate--r+60.0%
neg-sub060.0%
remove-double-neg60.0%
Simplified49.0%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-32) (not (<= (* a 120.0) 1e+40))) (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-32) || !((a * 120.0) <= 1e+40)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-2d-32)) .or. (.not. ((a * 120.0d0) <= 1d+40))) then
tmp = a * 120.0d0
else
tmp = (x - y) * (60.0d0 / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-32) || !((a * 120.0) <= 1e+40)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-32) or not ((a * 120.0) <= 1e+40): tmp = a * 120.0 else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-32) || !(Float64(a * 120.0) <= 1e+40)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e-32) || ~(((a * 120.0) <= 1e+40))) tmp = a * 120.0; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-32], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+40]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-32} \lor \neg \left(a \cdot 120 \leq 10^{+40}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.00000000000000011e-32 or 1.00000000000000003e40 < (*.f64 a #s(literal 120 binary64)) Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.3%
if -2.00000000000000011e-32 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000003e40Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.2%
associate-*r/78.1%
associate-*l/78.2%
*-commutative78.2%
Simplified78.2%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-32)
(* a 120.0)
(if (<= (* a 120.0) 5e+29)
(/ 60.0 (/ (- z t) (- x y)))
(+ (* a 120.0) (/ (* y 60.0) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-32) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e+29) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + ((y * 60.0) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-32)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 5d+29) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = (a * 120.0d0) + ((y * 60.0d0) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-32) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e+29) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + ((y * 60.0) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-32: tmp = a * 120.0 elif (a * 120.0) <= 5e+29: tmp = 60.0 / ((z - t) / (x - y)) else: tmp = (a * 120.0) + ((y * 60.0) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-32) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 5e+29) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * 60.0) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-32) tmp = a * 120.0; elseif ((a * 120.0) <= 5e+29) tmp = 60.0 / ((z - t) / (x - y)); else tmp = (a * 120.0) + ((y * 60.0) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-32], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+29], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * 60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-32}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot 60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.00000000000000011e-32Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.3%
if -2.00000000000000011e-32 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000001e29Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr78.6%
if 5.0000000000000001e29 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.1%
associate-*r/87.1%
Simplified87.1%
Taylor expanded in z around 0 78.0%
associate-*r/78.0%
*-commutative78.0%
Simplified78.0%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-32)
(* a 120.0)
(if (<= (* a 120.0) 5e+29)
(* (- x y) (/ 60.0 (- z t)))
(+ (* a 120.0) (/ (* y 60.0) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-32) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e+29) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + ((y * 60.0) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-32)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 5d+29) then
tmp = (x - y) * (60.0d0 / (z - t))
else
tmp = (a * 120.0d0) + ((y * 60.0d0) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-32) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e+29) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + ((y * 60.0) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-32: tmp = a * 120.0 elif (a * 120.0) <= 5e+29: tmp = (x - y) * (60.0 / (z - t)) else: tmp = (a * 120.0) + ((y * 60.0) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-32) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 5e+29) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * 60.0) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-32) tmp = a * 120.0; elseif ((a * 120.0) <= 5e+29) tmp = (x - y) * (60.0 / (z - t)); else tmp = (a * 120.0) + ((y * 60.0) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-32], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+29], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * 60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-32}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot 60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.00000000000000011e-32Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.3%
if -2.00000000000000011e-32 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000001e29Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.6%
associate-*r/78.5%
associate-*l/78.6%
*-commutative78.6%
Simplified78.6%
if 5.0000000000000001e29 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.1%
associate-*r/87.1%
Simplified87.1%
Taylor expanded in z around 0 78.0%
associate-*r/78.0%
*-commutative78.0%
Simplified78.0%
Final simplification78.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.75e+34) (not (<= z 45000000000.0))) (+ (* a 120.0) (* 60.0 (/ (- x y) z))) (+ (* a 120.0) (* 60.0 (/ (- y x) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.75e+34) || !(z <= 45000000000.0)) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else {
tmp = (a * 120.0) + (60.0 * ((y - 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 ((z <= (-2.75d+34)) .or. (.not. (z <= 45000000000.0d0))) then
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
else
tmp = (a * 120.0d0) + (60.0d0 * ((y - 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 ((z <= -2.75e+34) || !(z <= 45000000000.0)) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.75e+34) or not (z <= 45000000000.0): tmp = (a * 120.0) + (60.0 * ((x - y) / z)) else: tmp = (a * 120.0) + (60.0 * ((y - x) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.75e+34) || !(z <= 45000000000.0)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(y - x) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.75e+34) || ~((z <= 45000000000.0))) tmp = (a * 120.0) + (60.0 * ((x - y) / z)); else tmp = (a * 120.0) + (60.0 * ((y - x) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.75e+34], N[Not[LessEqual[z, 45000000000.0]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+34} \lor \neg \left(z \leq 45000000000\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y - x}{t}\\
\end{array}
\end{array}
if z < -2.7499999999999998e34 or 4.5e10 < z Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 94.8%
if -2.7499999999999998e34 < z < 4.5e10Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 83.3%
associate-*r/83.3%
neg-mul-183.3%
neg-sub083.3%
sub-neg83.3%
+-commutative83.3%
associate--r+83.3%
neg-sub083.3%
remove-double-neg83.3%
Simplified83.3%
Final simplification88.5%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.45e+54)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(if (<= x 1.05e+115)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (/ 60.0 (/ (- z t) x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e+54) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (x <= 1.05e+115) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / ((z - 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 <= (-1.45d+54)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else if (x <= 1.05d+115) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 / ((z - 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 <= -1.45e+54) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (x <= 1.05e+115) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.45e+54: tmp = (a * 120.0) + (60.0 * (x / (z - t))) elif x <= 1.05e+115: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.45e+54) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); elseif (x <= 1.05e+115) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.45e+54) tmp = (a * 120.0) + (60.0 * (x / (z - t))); elseif (x <= 1.05e+115) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (60.0 / ((z - t) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.45e+54], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+115], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+54}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+115}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\end{array}
\end{array}
if x < -1.4499999999999999e54Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 86.2%
if -1.4499999999999999e54 < x < 1.05000000000000002e115Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 93.2%
associate-*r/93.2%
Simplified93.2%
if 1.05000000000000002e115 < x Initial program 96.9%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 91.2%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.45e+34)
(+ (* a 120.0) (* 60.0 (/ (- x y) z)))
(if (<= z 126000000000.0)
(+ (* a 120.0) (* 60.0 (/ (- y x) t)))
(+ (* a 120.0) (/ 60.0 (/ z (- x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+34) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else if (z <= 126000000000.0) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.45d+34)) then
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
else if (z <= 126000000000.0d0) then
tmp = (a * 120.0d0) + (60.0d0 * ((y - x) / t))
else
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+34) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else if (z <= 126000000000.0) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+34: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) elif z <= 126000000000.0: tmp = (a * 120.0) + (60.0 * ((y - x) / t)) else: tmp = (a * 120.0) + (60.0 / (z / (x - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+34) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); elseif (z <= 126000000000.0) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(y - x) / t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+34) tmp = (a * 120.0) + (60.0 * ((x - y) / z)); elseif (z <= 126000000000.0) tmp = (a * 120.0) + (60.0 * ((y - x) / t)); else tmp = (a * 120.0) + (60.0 / (z / (x - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+34], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 126000000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+34}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;z \leq 126000000000:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\end{array}
\end{array}
if z < -1.4500000000000001e34Initial program 98.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 93.2%
if -1.4500000000000001e34 < z < 1.26e11Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 83.3%
associate-*r/83.3%
neg-mul-183.3%
neg-sub083.3%
sub-neg83.3%
+-commutative83.3%
associate--r+83.3%
neg-sub083.3%
remove-double-neg83.3%
Simplified83.3%
if 1.26e11 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 96.5%
Final simplification88.5%
(FPCore (x y z t a)
:precision binary64
(if (<= y -4.3e+156)
(* (- x y) (/ 60.0 (- z t)))
(if (<= y 4.45e+105)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(* 60.0 (/ (- x y) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.3e+156) {
tmp = (x - y) * (60.0 / (z - t));
} else if (y <= 4.45e+105) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} 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 (y <= (-4.3d+156)) then
tmp = (x - y) * (60.0d0 / (z - t))
else if (y <= 4.45d+105) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
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 (y <= -4.3e+156) {
tmp = (x - y) * (60.0 / (z - t));
} else if (y <= 4.45e+105) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.3e+156: tmp = (x - y) * (60.0 / (z - t)) elif y <= 4.45e+105: tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.3e+156) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (y <= 4.45e+105) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); 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 (y <= -4.3e+156) tmp = (x - y) * (60.0 / (z - t)); elseif (y <= 4.45e+105) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.3e+156], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.45e+105], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+156}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;y \leq 4.45 \cdot 10^{+105}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if y < -4.29999999999999985e156Initial program 99.6%
associate-/l*99.4%
Simplified99.4%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 80.2%
associate-*r/80.3%
associate-*l/80.5%
*-commutative80.5%
Simplified80.5%
if -4.29999999999999985e156 < y < 4.44999999999999987e105Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.4%
if 4.44999999999999987e105 < y Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 79.0%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (<= (- x y) -1e+145) (* 60.0 (/ x (- z t))) (if (<= (- x y) 2e+148) (* a 120.0) (* y (/ -60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+145) {
tmp = 60.0 * (x / (z - t));
} else if ((x - y) <= 2e+148) {
tmp = a * 120.0;
} else {
tmp = 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 - y) <= (-1d+145)) then
tmp = 60.0d0 * (x / (z - t))
else if ((x - y) <= 2d+148) then
tmp = a * 120.0d0
else
tmp = 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 - y) <= -1e+145) {
tmp = 60.0 * (x / (z - t));
} else if ((x - y) <= 2e+148) {
tmp = a * 120.0;
} else {
tmp = y * (-60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -1e+145: tmp = 60.0 * (x / (z - t)) elif (x - y) <= 2e+148: tmp = a * 120.0 else: tmp = y * (-60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -1e+145) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (Float64(x - y) <= 2e+148) tmp = Float64(a * 120.0); else tmp = 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 - y) <= -1e+145) tmp = 60.0 * (x / (z - t)); elseif ((x - y) <= 2e+148) tmp = a * 120.0; else tmp = y * (-60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -1e+145], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 2e+148], N[(a * 120.0), $MachinePrecision], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+145}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+148}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\end{array}
\end{array}
if (-.f64 x y) < -9.9999999999999999e144Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
+-commutative99.7%
fma-define99.7%
associate-/r/99.7%
div-inv99.6%
*-commutative99.6%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 56.9%
if -9.9999999999999999e144 < (-.f64 x y) < 2.0000000000000001e148Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.8%
if 2.0000000000000001e148 < (-.f64 x y) Initial program 98.0%
associate-/l*99.5%
Simplified99.5%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
+-commutative99.7%
fma-define99.8%
associate-/r/99.8%
div-inv99.6%
*-commutative99.6%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 51.8%
associate-*r/51.8%
*-commutative51.8%
Simplified51.8%
associate-/l*51.9%
Applied egg-rr51.9%
Final simplification61.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.28e-34) (not (<= a 8.2e+37))) (* 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 <= -1.28e-34) || !(a <= 8.2e+37)) {
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 <= (-1.28d-34)) .or. (.not. (a <= 8.2d+37))) 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 <= -1.28e-34) || !(a <= 8.2e+37)) {
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 <= -1.28e-34) or not (a <= 8.2e+37): 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 <= -1.28e-34) || !(a <= 8.2e+37)) 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 <= -1.28e-34) || ~((a <= 8.2e+37))) 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, -1.28e-34], N[Not[LessEqual[a, 8.2e+37]], $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 -1.28 \cdot 10^{-34} \lor \neg \left(a \leq 8.2 \cdot 10^{+37}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.2799999999999999e-34 or 8.1999999999999996e37 < a Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.3%
if -1.2799999999999999e-34 < a < 8.1999999999999996e37Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.2%
Final simplification76.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.55e+186) (* 60.0 (/ x z)) (if (<= x -1.1e+116) (/ (* x -60.0) t) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.55e+186) {
tmp = 60.0 * (x / z);
} else if (x <= -1.1e+116) {
tmp = (x * -60.0) / 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.55d+186)) then
tmp = 60.0d0 * (x / z)
else if (x <= (-1.1d+116)) then
tmp = (x * (-60.0d0)) / 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.55e+186) {
tmp = 60.0 * (x / z);
} else if (x <= -1.1e+116) {
tmp = (x * -60.0) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.55e+186: tmp = 60.0 * (x / z) elif x <= -1.1e+116: tmp = (x * -60.0) / t else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.55e+186) tmp = Float64(60.0 * Float64(x / z)); elseif (x <= -1.1e+116) tmp = Float64(Float64(x * -60.0) / 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.55e+186) tmp = 60.0 * (x / z); elseif (x <= -1.1e+116) tmp = (x * -60.0) / t; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.55e+186], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.1e+116], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+186}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{+116}:\\
\;\;\;\;\frac{x \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.5500000000000001e186Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.7%
Applied egg-rr99.7%
+-commutative99.7%
fma-define99.8%
associate-/r/99.7%
div-inv99.6%
*-commutative99.6%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 82.3%
Taylor expanded in z around inf 55.5%
if -1.5500000000000001e186 < x < -1.1e116Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
+-commutative99.7%
fma-define99.7%
associate-/r/99.7%
div-inv99.7%
*-commutative99.7%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 61.0%
Taylor expanded in z around 0 56.0%
associate-*r/56.1%
Simplified56.1%
if -1.1e116 < x Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 55.1%
Final simplification55.2%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.15e+186) (* 60.0 (/ x z)) (if (<= x -3e+114) (* -60.0 (/ x t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.15e+186) {
tmp = 60.0 * (x / z);
} else if (x <= -3e+114) {
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.15d+186)) then
tmp = 60.0d0 * (x / z)
else if (x <= (-3d+114)) 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.15e+186) {
tmp = 60.0 * (x / z);
} else if (x <= -3e+114) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.15e+186: tmp = 60.0 * (x / z) elif x <= -3e+114: 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.15e+186) tmp = Float64(60.0 * Float64(x / z)); elseif (x <= -3e+114) 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.15e+186) tmp = 60.0 * (x / z); elseif (x <= -3e+114) 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.15e+186], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3e+114], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+186}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;x \leq -3 \cdot 10^{+114}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.15000000000000007e186Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.7%
Applied egg-rr99.7%
+-commutative99.7%
fma-define99.8%
associate-/r/99.7%
div-inv99.6%
*-commutative99.6%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 82.3%
Taylor expanded in z around inf 55.5%
if -1.15000000000000007e186 < x < -3e114Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
+-commutative99.7%
fma-define99.7%
associate-/r/99.7%
div-inv99.7%
*-commutative99.7%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 61.0%
Taylor expanded in z around 0 56.0%
if -3e114 < x Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 55.1%
Final simplification55.2%
(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.3%
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 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.3%
*-commutative99.3%
associate-/l*99.7%
Applied egg-rr99.7%
(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.3%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.55e+115) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.55e+115) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.55d+115)) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.55e+115) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.55e+115: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.55e+115) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.55e+115) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.55e+115], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+115}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.55000000000000002e115Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.7%
Applied egg-rr99.7%
+-commutative99.7%
fma-define99.8%
associate-/r/99.7%
div-inv99.6%
*-commutative99.6%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 75.1%
if -1.55000000000000002e115 < x Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 55.1%
Final simplification58.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.1e+116) (* -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+116) {
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+116)) 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+116) {
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+116: 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+116) 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+116) 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+116], 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^{+116}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.1e116Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.7%
Applied egg-rr99.7%
+-commutative99.7%
fma-define99.8%
associate-/r/99.7%
div-inv99.6%
*-commutative99.6%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 75.1%
Taylor expanded in z around 0 45.0%
if -1.1e116 < x Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 55.1%
Final simplification53.3%
(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.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 48.3%
Final simplification48.3%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024118
(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)))