
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-74) (not (<= (* a 120.0) 1000000.0))) (* a 120.0) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-74) || !((a * 120.0) <= 1000000.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-2d-74)) .or. (.not. ((a * 120.0d0) <= 1000000.0d0))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 / ((z - t) / (x - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-74) || !((a * 120.0) <= 1000000.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-74) or not ((a * 120.0) <= 1000000.0): tmp = a * 120.0 else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-74) || !(Float64(a * 120.0) <= 1000000.0)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e-74) || ~(((a * 120.0) <= 1000000.0))) tmp = a * 120.0; else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-74], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-74} \lor \neg \left(a \cdot 120 \leq 1000000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999992e-74 or 1e6 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 83.9%
if -1.99999999999999992e-74 < (*.f64 a #s(literal 120 binary64)) < 1e6Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 77.1%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr77.1%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-74) (not (<= (* a 120.0) 1000000.0))) (* 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 * 120.0) <= -2e-74) || !((a * 120.0) <= 1000000.0)) {
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 * 120.0d0) <= (-2d-74)) .or. (.not. ((a * 120.0d0) <= 1000000.0d0))) 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 * 120.0) <= -2e-74) || !((a * 120.0) <= 1000000.0)) {
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 * 120.0) <= -2e-74) or not ((a * 120.0) <= 1000000.0): 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 ((Float64(a * 120.0) <= -2e-74) || !(Float64(a * 120.0) <= 1000000.0)) 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 * 120.0) <= -2e-74) || ~(((a * 120.0) <= 1000000.0))) 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[N[(a * 120.0), $MachinePrecision], -2e-74], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0]], $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 \cdot 120 \leq -2 \cdot 10^{-74} \lor \neg \left(a \cdot 120 \leq 1000000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999992e-74 or 1e6 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 83.9%
if -1.99999999999999992e-74 < (*.f64 a #s(literal 120 binary64)) < 1e6Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 77.1%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.8e-110)
(* a 120.0)
(if (<= a -1.9e-244)
(* 60.0 (/ (- y x) t))
(if (<= a 2.65e-160) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.8e-110) {
tmp = a * 120.0;
} else if (a <= -1.9e-244) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 2.65e-160) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.8d-110)) then
tmp = a * 120.0d0
else if (a <= (-1.9d-244)) then
tmp = 60.0d0 * ((y - x) / t)
else if (a <= 2.65d-160) then
tmp = 60.0d0 * ((x - y) / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.8e-110) {
tmp = a * 120.0;
} else if (a <= -1.9e-244) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 2.65e-160) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.8e-110: tmp = a * 120.0 elif a <= -1.9e-244: tmp = 60.0 * ((y - x) / t) elif a <= 2.65e-160: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.8e-110) tmp = Float64(a * 120.0); elseif (a <= -1.9e-244) tmp = Float64(60.0 * Float64(Float64(y - x) / t)); elseif (a <= 2.65e-160) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.8e-110) tmp = a * 120.0; elseif (a <= -1.9e-244) tmp = 60.0 * ((y - x) / t); elseif (a <= 2.65e-160) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.8e-110], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.9e-244], N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.65e-160], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{-110}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{-244}:\\
\;\;\;\;60 \cdot \frac{y - x}{t}\\
\mathbf{elif}\;a \leq 2.65 \cdot 10^{-160}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.80000000000000013e-110 or 2.6500000000000001e-160 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.8%
if -4.80000000000000013e-110 < a < -1.9e-244Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 93.4%
Taylor expanded in z around 0 71.0%
associate-*r/77.4%
neg-mul-177.4%
neg-sub077.4%
sub-neg77.4%
+-commutative77.4%
associate--r+77.4%
neg-sub077.4%
remove-double-neg77.4%
Simplified71.0%
if -1.9e-244 < a < 2.6500000000000001e-160Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 90.5%
Taylor expanded in z around inf 64.4%
Final simplification71.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8.8e+68) (not (<= y 6.4e+89))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (/ (* 60.0 x) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.8e+68) || !(y <= 6.4e+89)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} 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 ((y <= (-8.8d+68)) .or. (.not. (y <= 6.4d+89))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
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 ((y <= -8.8e+68) || !(y <= 6.4e+89)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.8e+68) or not (y <= 6.4e+89): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.8e+68) || !(y <= 6.4e+89)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); 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 ((y <= -8.8e+68) || ~((y <= 6.4e+89))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((60.0 * x) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.8e+68], N[Not[LessEqual[y, 6.4e+89]], $MachinePrecision]], 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[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+68} \lor \neg \left(y \leq 6.4 \cdot 10^{+89}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\end{array}
\end{array}
if y < -8.79999999999999949e68 or 6.39999999999999974e89 < y Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 95.2%
associate-*r/95.3%
Simplified95.3%
if -8.79999999999999949e68 < y < 6.39999999999999974e89Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.4%
associate-*r/95.3%
Simplified95.3%
Final simplification95.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.2e+83) (not (<= t 9.5e-119))) (+ (* a 120.0) (* 60.0 (/ (- y x) t))) (+ (* a 120.0) (* 60.0 (/ (- x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.2e+83) || !(t <= 9.5e-119)) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-5.2d+83)) .or. (.not. (t <= 9.5d-119))) then
tmp = (a * 120.0d0) + (60.0d0 * ((y - x) / t))
else
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.2e+83) || !(t <= 9.5e-119)) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.2e+83) or not (t <= 9.5e-119): tmp = (a * 120.0) + (60.0 * ((y - x) / t)) else: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.2e+83) || !(t <= 9.5e-119)) 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(Float64(x - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.2e+83) || ~((t <= 9.5e-119))) tmp = (a * 120.0) + (60.0 * ((y - x) / t)); else tmp = (a * 120.0) + (60.0 * ((x - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.2e+83], N[Not[LessEqual[t, 9.5e-119]], $MachinePrecision]], 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[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+83} \lor \neg \left(t \leq 9.5 \cdot 10^{-119}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if t < -5.2000000000000002e83 or 9.5000000000000002e-119 < t Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 92.3%
associate-*r/92.3%
neg-mul-192.3%
neg-sub092.3%
sub-neg92.3%
+-commutative92.3%
associate--r+92.3%
neg-sub092.3%
remove-double-neg92.3%
Simplified92.3%
if -5.2000000000000002e83 < t < 9.5000000000000002e-119Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 84.7%
Final simplification88.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.2e+69)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(if (<= y 5.2e+89)
(+ (* a 120.0) (/ (* 60.0 x) (- z t)))
(+ (* a 120.0) (/ 60.0 (/ (- t z) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.2e+69) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else if (y <= 5.2e+89) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / ((t - z) / 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 (y <= (-1.2d+69)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else if (y <= 5.2d+89) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 / ((t - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.2e+69) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else if (y <= 5.2e+89) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.2e+69: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) elif y <= 5.2e+89: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) else: tmp = (a * 120.0) + (60.0 / ((t - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.2e+69) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); elseif (y <= 5.2e+89) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(t - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.2e+69) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); elseif (y <= 5.2e+89) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); else tmp = (a * 120.0) + (60.0 / ((t - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.2e+69], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+89], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+69}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+89}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\
\end{array}
\end{array}
if y < -1.2000000000000001e69Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 93.8%
associate-*r/93.9%
Simplified93.9%
if -1.2000000000000001e69 < y < 5.2000000000000001e89Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.4%
associate-*r/95.3%
Simplified95.3%
if 5.2000000000000001e89 < y Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 97.3%
neg-mul-197.3%
Simplified97.3%
Final simplification95.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.2e+83)
(+ (* a 120.0) (* 60.0 (/ (- y x) t)))
(if (<= t 2.3e-118)
(+ (* a 120.0) (* (- x y) (/ 60.0 z)))
(+ (* a 120.0) (* (- x y) (/ -60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.2e+83) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else if (t <= 2.3e-118) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + ((x - 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 (t <= (-5.2d+83)) then
tmp = (a * 120.0d0) + (60.0d0 * ((y - x) / t))
else if (t <= 2.3d-118) then
tmp = (a * 120.0d0) + ((x - y) * (60.0d0 / z))
else
tmp = (a * 120.0d0) + ((x - 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 (t <= -5.2e+83) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else if (t <= 2.3e-118) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.2e+83: tmp = (a * 120.0) + (60.0 * ((y - x) / t)) elif t <= 2.3e-118: tmp = (a * 120.0) + ((x - y) * (60.0 / z)) else: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.2e+83) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(y - x) / t))); elseif (t <= 2.3e-118) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / z))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.2e+83) tmp = (a * 120.0) + (60.0 * ((y - x) / t)); elseif (t <= 2.3e-118) tmp = (a * 120.0) + ((x - y) * (60.0 / z)); else tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.2e+83], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-118], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+83}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y - x}{t}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-118}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if t < -5.2000000000000002e83Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 96.3%
associate-*r/96.3%
neg-mul-196.3%
neg-sub096.3%
sub-neg96.3%
+-commutative96.3%
associate--r+96.3%
neg-sub096.3%
remove-double-neg96.3%
Simplified96.3%
if -5.2000000000000002e83 < t < 2.30000000000000021e-118Initial program 99.7%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 84.8%
if 2.30000000000000021e-118 < t Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 89.7%
Final simplification88.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.2e+83)
(+ (* a 120.0) (* 60.0 (/ (- y x) t)))
(if (<= t 4e-119)
(+ (* a 120.0) (* 60.0 (/ (- x y) z)))
(+ (* a 120.0) (* (- x y) (/ -60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.2e+83) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else if (t <= 4e-119) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else {
tmp = (a * 120.0) + ((x - 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 (t <= (-5.2d+83)) then
tmp = (a * 120.0d0) + (60.0d0 * ((y - x) / t))
else if (t <= 4d-119) then
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
else
tmp = (a * 120.0d0) + ((x - 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 (t <= -5.2e+83) {
tmp = (a * 120.0) + (60.0 * ((y - x) / t));
} else if (t <= 4e-119) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.2e+83: tmp = (a * 120.0) + (60.0 * ((y - x) / t)) elif t <= 4e-119: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) else: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.2e+83) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(y - x) / t))); elseif (t <= 4e-119) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.2e+83) tmp = (a * 120.0) + (60.0 * ((y - x) / t)); elseif (t <= 4e-119) tmp = (a * 120.0) + (60.0 * ((x - y) / z)); else tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.2e+83], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-119], 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[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+83}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y - x}{t}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-119}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if t < -5.2000000000000002e83Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 96.3%
associate-*r/96.3%
neg-mul-196.3%
neg-sub096.3%
sub-neg96.3%
+-commutative96.3%
associate--r+96.3%
neg-sub096.3%
remove-double-neg96.3%
Simplified96.3%
if -5.2000000000000002e83 < t < 4.00000000000000005e-119Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 84.7%
if 4.00000000000000005e-119 < t Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 89.7%
Final simplification88.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.8e+78)
(+ (* a 120.0) (/ (* 60.0 y) t))
(if (<= t 2.4e-118)
(+ (* a 120.0) (* 60.0 (/ (- x y) z)))
(+ (* a 120.0) (* x (/ -60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.8e+78) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if (t <= 2.4e-118) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4.8d+78)) then
tmp = (a * 120.0d0) + ((60.0d0 * y) / t)
else if (t <= 2.4d-118) then
tmp = (a * 120.0d0) + (60.0d0 * ((x - y) / z))
else
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.8e+78) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if (t <= 2.4e-118) {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.8e+78: tmp = (a * 120.0) + ((60.0 * y) / t) elif t <= 2.4e-118: tmp = (a * 120.0) + (60.0 * ((x - y) / z)) else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.8e+78) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * y) / t)); elseif (t <= 2.4e-118) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / z))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.8e+78) tmp = (a * 120.0) + ((60.0 * y) / t); elseif (t <= 2.4e-118) tmp = (a * 120.0) + (60.0 * ((x - y) / z)); else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.8e+78], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-118], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+78}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-118}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if t < -4.7999999999999997e78Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 88.3%
associate-*r/88.3%
Simplified88.3%
Taylor expanded in z around 0 88.3%
associate-*r/88.3%
*-commutative88.3%
Simplified88.3%
if -4.7999999999999997e78 < t < 2.4000000000000001e-118Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 85.2%
if 2.4000000000000001e-118 < t Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 89.7%
Taylor expanded in x around inf 80.4%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.5e-109) (not (<= a 2.7e-160))) (* a 120.0) (* 60.0 (/ (- x y) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e-109) || !(a <= 2.7e-160)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.5d-109)) .or. (.not. (a <= 2.7d-160))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e-109) || !(a <= 2.7e-160)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.5e-109) or not (a <= 2.7e-160): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.5e-109) || !(a <= 2.7e-160)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.5e-109) || ~((a <= 2.7e-160))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.5e-109], N[Not[LessEqual[a, 2.7e-160]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-109} \lor \neg \left(a \leq 2.7 \cdot 10^{-160}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if a < -2.5000000000000001e-109 or 2.7000000000000001e-160 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.8%
if -2.5000000000000001e-109 < a < 2.7000000000000001e-160Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 91.5%
Taylor expanded in z around inf 56.0%
Final simplification68.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.7e-171) (not (<= a 3.3e-212))) (* a 120.0) (* 60.0 (/ x z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.7e-171) || !(a <= 3.3e-212)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / 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 <= (-2.7d-171)) .or. (.not. (a <= 3.3d-212))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / 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 <= -2.7e-171) || !(a <= 3.3e-212)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.7e-171) or not (a <= 3.3e-212): tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.7e-171) || !(a <= 3.3e-212)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.7e-171) || ~((a <= 3.3e-212))) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.7e-171], N[Not[LessEqual[a, 3.3e-212]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{-171} \lor \neg \left(a \leq 3.3 \cdot 10^{-212}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if a < -2.70000000000000014e-171 or 3.3000000000000002e-212 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.4%
if -2.70000000000000014e-171 < a < 3.3000000000000002e-212Initial 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 93.2%
Taylor expanded in z around inf 58.2%
Taylor expanded in x around inf 37.6%
Final simplification63.5%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.7%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.75e+250) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.75e+250) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= 1.75d+250) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.75e+250) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.75e+250: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 1.75e+250) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 1.75e+250) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 1.75e+250], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.75 \cdot 10^{+250}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < 1.75e250Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.2%
if 1.75e250 < x Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 78.9%
Taylor expanded in x around inf 78.9%
Taylor expanded in x around inf 64.7%
Final simplification60.5%
(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.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.1%
Final simplification58.1%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024123
(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)))