
(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 15 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 (- 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}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= z -1.42e-30)
t_1
(if (<= z 2.1e-163)
(+ (* a 120.0) (* -60.0 (/ (- x y) t)))
(if (<= z 3.8e-82)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 5.8e-47) (+ (* a 120.0) (/ (* 60.0 y) t)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -1.42e-30) {
tmp = t_1;
} else if (z <= 2.1e-163) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else if (z <= 3.8e-82) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 5.8e-47) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if (z <= (-1.42d-30)) then
tmp = t_1
else if (z <= 2.1d-163) then
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
else if (z <= 3.8d-82) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 5.8d-47) then
tmp = (a * 120.0d0) + ((60.0d0 * y) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -1.42e-30) {
tmp = t_1;
} else if (z <= 2.1e-163) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else if (z <= 3.8e-82) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 5.8e-47) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if z <= -1.42e-30: tmp = t_1 elif z <= 2.1e-163: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) elif z <= 3.8e-82: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 5.8e-47: tmp = (a * 120.0) + ((60.0 * y) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (z <= -1.42e-30) tmp = t_1; elseif (z <= 2.1e-163) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); elseif (z <= 3.8e-82) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 5.8e-47) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * y) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if (z <= -1.42e-30) tmp = t_1; elseif (z <= 2.1e-163) tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); elseif (z <= 3.8e-82) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 5.8e-47) tmp = (a * 120.0) + ((60.0 * y) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.42e-30], t$95$1, If[LessEqual[z, 2.1e-163], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-82], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-47], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -1.42 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-163}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-82}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-47}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.42e-30 or 5.8000000000000001e-47 < z Initial program 99.9%
Taylor expanded in z around inf 88.5%
Taylor expanded in x around 0 82.7%
if -1.42e-30 < z < 2.09999999999999998e-163Initial program 99.8%
Taylor expanded in z around 0 89.2%
if 2.09999999999999998e-163 < z < 3.8000000000000002e-82Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 93.0%
if 3.8000000000000002e-82 < z < 5.8000000000000001e-47Initial program 100.0%
Taylor expanded in x around 0 99.8%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in z around 0 99.8%
associate-*r/100.0%
Simplified100.0%
Final simplification86.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -1.95e-53)
(* a 120.0)
(if (<= a -1.8e-295)
t_1
(if (<= a 4.6e-278)
(* 60.0 (/ x (- z t)))
(if (<= a 3.4e-43) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.95e-53) {
tmp = a * 120.0;
} else if (a <= -1.8e-295) {
tmp = t_1;
} else if (a <= 4.6e-278) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 3.4e-43) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (a <= (-1.95d-53)) then
tmp = a * 120.0d0
else if (a <= (-1.8d-295)) then
tmp = t_1
else if (a <= 4.6d-278) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 3.4d-43) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.95e-53) {
tmp = a * 120.0;
} else if (a <= -1.8e-295) {
tmp = t_1;
} else if (a <= 4.6e-278) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 3.4e-43) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -1.95e-53: tmp = a * 120.0 elif a <= -1.8e-295: tmp = t_1 elif a <= 4.6e-278: tmp = 60.0 * (x / (z - t)) elif a <= 3.4e-43: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -1.95e-53) tmp = Float64(a * 120.0); elseif (a <= -1.8e-295) tmp = t_1; elseif (a <= 4.6e-278) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 3.4e-43) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -1.95e-53) tmp = a * 120.0; elseif (a <= -1.8e-295) tmp = t_1; elseif (a <= 4.6e-278) tmp = 60.0 * (x / (z - t)); elseif (a <= 3.4e-43) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.95e-53], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.8e-295], t$95$1, If[LessEqual[a, 4.6e-278], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e-43], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -1.95 \cdot 10^{-53}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-295}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-278}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.9500000000000001e-53 or 3.4000000000000001e-43 < a Initial program 99.9%
Taylor expanded in z around inf 71.0%
if -1.9500000000000001e-53 < a < -1.8000000000000001e-295 or 4.60000000000000006e-278 < a < 3.4000000000000001e-43Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.1%
if -1.8000000000000001e-295 < a < 4.60000000000000006e-278Initial program 99.6%
*-commutative99.6%
associate-/l*99.3%
frac-2neg99.3%
distribute-frac-neg99.3%
div-inv99.3%
distribute-rgt-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 85.2%
Final simplification67.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -1.5e-53)
(* a 120.0)
(if (<= a -5.4e-296)
t_1
(if (<= a 1.9e-277)
(* x (/ 60.0 (- z t)))
(if (<= a 3.3e-43) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.5e-53) {
tmp = a * 120.0;
} else if (a <= -5.4e-296) {
tmp = t_1;
} else if (a <= 1.9e-277) {
tmp = x * (60.0 / (z - t));
} else if (a <= 3.3e-43) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (a <= (-1.5d-53)) then
tmp = a * 120.0d0
else if (a <= (-5.4d-296)) then
tmp = t_1
else if (a <= 1.9d-277) then
tmp = x * (60.0d0 / (z - t))
else if (a <= 3.3d-43) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.5e-53) {
tmp = a * 120.0;
} else if (a <= -5.4e-296) {
tmp = t_1;
} else if (a <= 1.9e-277) {
tmp = x * (60.0 / (z - t));
} else if (a <= 3.3e-43) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -1.5e-53: tmp = a * 120.0 elif a <= -5.4e-296: tmp = t_1 elif a <= 1.9e-277: tmp = x * (60.0 / (z - t)) elif a <= 3.3e-43: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -1.5e-53) tmp = Float64(a * 120.0); elseif (a <= -5.4e-296) tmp = t_1; elseif (a <= 1.9e-277) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (a <= 3.3e-43) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -1.5e-53) tmp = a * 120.0; elseif (a <= -5.4e-296) tmp = t_1; elseif (a <= 1.9e-277) tmp = x * (60.0 / (z - t)); elseif (a <= 3.3e-43) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.5e-53], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -5.4e-296], t$95$1, If[LessEqual[a, 1.9e-277], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.3e-43], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -1.5 \cdot 10^{-53}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -5.4 \cdot 10^{-296}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-277}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.5000000000000001e-53 or 3.30000000000000016e-43 < a Initial program 99.9%
Taylor expanded in z around inf 71.0%
if -1.5000000000000001e-53 < a < -5.39999999999999998e-296 or 1.89999999999999993e-277 < a < 3.30000000000000016e-43Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.1%
if -5.39999999999999998e-296 < a < 1.89999999999999993e-277Initial program 99.6%
*-commutative99.6%
associate-/l*99.3%
frac-2neg99.3%
distribute-frac-neg99.3%
div-inv99.3%
distribute-rgt-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 85.2%
associate-*r/85.4%
associate-*l/85.6%
*-commutative85.6%
Simplified85.6%
Final simplification67.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.8e-10)
(* a 120.0)
(if (<= a 3.9e-47)
(* (- x y) (/ -60.0 t))
(if (<= a 0.057)
(* x (/ 60.0 (- z t)))
(if (<= a 55000.0) (* -60.0 (/ y (- z t))) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.8e-10) {
tmp = a * 120.0;
} else if (a <= 3.9e-47) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 0.057) {
tmp = x * (60.0 / (z - t));
} else if (a <= 55000.0) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.8d-10)) then
tmp = a * 120.0d0
else if (a <= 3.9d-47) then
tmp = (x - y) * ((-60.0d0) / t)
else if (a <= 0.057d0) then
tmp = x * (60.0d0 / (z - t))
else if (a <= 55000.0d0) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.8e-10) {
tmp = a * 120.0;
} else if (a <= 3.9e-47) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 0.057) {
tmp = x * (60.0 / (z - t));
} else if (a <= 55000.0) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.8e-10: tmp = a * 120.0 elif a <= 3.9e-47: tmp = (x - y) * (-60.0 / t) elif a <= 0.057: tmp = x * (60.0 / (z - t)) elif a <= 55000.0: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.8e-10) tmp = Float64(a * 120.0); elseif (a <= 3.9e-47) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (a <= 0.057) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (a <= 55000.0) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.8e-10) tmp = a * 120.0; elseif (a <= 3.9e-47) tmp = (x - y) * (-60.0 / t); elseif (a <= 0.057) tmp = x * (60.0 / (z - t)); elseif (a <= 55000.0) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.8e-10], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.9e-47], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.057], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 55000.0], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{-10}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-47}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \leq 0.057:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \leq 55000:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -5.79999999999999962e-10 or 55000 < a Initial program 99.9%
Taylor expanded in z around inf 76.8%
if -5.79999999999999962e-10 < a < 3.89999999999999978e-47Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in t around 0 55.1%
metadata-eval55.1%
distribute-lft-neg-in55.1%
*-commutative55.1%
associate-*l/55.2%
associate-*r/55.1%
distribute-rgt-neg-out55.1%
distribute-neg-frac55.1%
metadata-eval55.1%
Simplified55.1%
if 3.89999999999999978e-47 < a < 0.0570000000000000021Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 56.6%
associate-*r/56.8%
associate-*l/56.7%
*-commutative56.7%
Simplified56.7%
if 0.0570000000000000021 < a < 55000Initial program 100.0%
*-commutative100.0%
associate-/l*100.0%
frac-2neg100.0%
distribute-frac-neg100.0%
div-inv100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 100.0%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-6) (not (<= (* a 120.0) 10000000.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-6) || !((a * 120.0) <= 10000000.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-6)) .or. (.not. ((a * 120.0d0) <= 10000000.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-6) || !((a * 120.0) <= 10000000.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-6) or not ((a * 120.0) <= 10000000.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-6) || !(Float64(a * 120.0) <= 10000000.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-6) || ~(((a * 120.0) <= 10000000.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-6], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 10000000.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^{-6} \lor \neg \left(a \cdot 120 \leq 10000000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.99999999999999991e-6 or 1e7 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 76.8%
if -1.99999999999999991e-6 < (*.f64 a 120) < 1e7Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 80.5%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-6)
(* a 120.0)
(if (<= (* a 120.0) 10000000.0)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* 60.0 (/ x z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-6) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 10000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (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 * 120.0d0) <= (-2d-6)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 10000000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (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 * 120.0) <= -2e-6) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 10000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-6: tmp = a * 120.0 elif (a * 120.0) <= 10000000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (x / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-6) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 10000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-6) tmp = a * 120.0; elseif ((a * 120.0) <= 10000000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-6], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 10000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-6}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.99999999999999991e-6Initial program 99.9%
Taylor expanded in z around inf 74.9%
if -1.99999999999999991e-6 < (*.f64 a 120) < 1e7Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 80.5%
if 1e7 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 83.2%
Taylor expanded in x around inf 82.7%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.6e+78) (not (<= t 1.05e-24))) (+ (* a 120.0) (* -60.0 (/ (- x y) 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 <= -6.6e+78) || !(t <= 1.05e-24)) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / 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 <= (-6.6d+78)) .or. (.not. (t <= 1.05d-24))) then
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / 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 <= -6.6e+78) || !(t <= 1.05e-24)) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.6e+78) or not (t <= 1.05e-24): tmp = (a * 120.0) + (-60.0 * ((x - y) / 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 <= -6.6e+78) || !(t <= 1.05e-24)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / 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 <= -6.6e+78) || ~((t <= 1.05e-24))) tmp = (a * 120.0) + (-60.0 * ((x - y) / 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, -6.6e+78], N[Not[LessEqual[t, 1.05e-24]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $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 -6.6 \cdot 10^{+78} \lor \neg \left(t \leq 1.05 \cdot 10^{-24}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if t < -6.6e78 or 1.05e-24 < t Initial program 99.8%
Taylor expanded in z around 0 95.5%
if -6.6e78 < t < 1.05e-24Initial program 99.9%
Taylor expanded in z around inf 83.5%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.6e+78) (not (<= t 4.1e-22))) (+ (* a 120.0) (* (- x y) (/ -60.0 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 <= -6.6e+78) || !(t <= 4.1e-22)) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / 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 <= (-6.6d+78)) .or. (.not. (t <= 4.1d-22))) then
tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / 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 <= -6.6e+78) || !(t <= 4.1e-22)) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
} else {
tmp = (a * 120.0) + (60.0 * ((x - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.6e+78) or not (t <= 4.1e-22): tmp = (a * 120.0) + ((x - y) * (-60.0 / 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 <= -6.6e+78) || !(t <= 4.1e-22)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / 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 <= -6.6e+78) || ~((t <= 4.1e-22))) tmp = (a * 120.0) + ((x - y) * (-60.0 / 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, -6.6e+78], N[Not[LessEqual[t, 4.1e-22]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / 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 -6.6 \cdot 10^{+78} \lor \neg \left(t \leq 4.1 \cdot 10^{-22}\right):\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if t < -6.6e78 or 4.0999999999999999e-22 < t Initial program 99.8%
associate-/l*99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 95.5%
if -6.6e78 < t < 4.0999999999999999e-22Initial program 99.9%
Taylor expanded in z around inf 83.5%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7800000000.0) (not (<= x 2.1e+75))) (+ (* a 120.0) (* x (/ 60.0 (- z t)))) (+ (* a 120.0) (/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7800000000.0) || !(x <= 2.1e+75)) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-7800000000.0d0)) .or. (.not. (x <= 2.1d+75))) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7800000000.0) || !(x <= 2.1e+75)) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7800000000.0) or not (x <= 2.1e+75): tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7800000000.0) || !(x <= 2.1e+75)) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -7800000000.0) || ~((x <= 2.1e+75))) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7800000000.0], N[Not[LessEqual[x, 2.1e+75]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7800000000 \lor \neg \left(x \leq 2.1 \cdot 10^{+75}\right):\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if x < -7.8e9 or 2.09999999999999999e75 < x Initial program 99.8%
Taylor expanded in x around inf 87.2%
associate-*r/87.2%
*-commutative87.2%
associate-*r/87.3%
Simplified87.3%
if -7.8e9 < x < 2.09999999999999999e75Initial program 99.9%
Taylor expanded in x around 0 94.9%
associate-*r/94.9%
Simplified94.9%
Final simplification91.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5e-55) (not (<= a 3.2e-43))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5e-55) || !(a <= 3.2e-43)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-5d-55)) .or. (.not. (a <= 3.2d-43))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5e-55) || !(a <= 3.2e-43)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5e-55) or not (a <= 3.2e-43): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5e-55) || !(a <= 3.2e-43)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5e-55) || ~((a <= 3.2e-43))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5e-55], N[Not[LessEqual[a, 3.2e-43]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{-55} \lor \neg \left(a \leq 3.2 \cdot 10^{-43}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -5.0000000000000002e-55 or 3.19999999999999985e-43 < a Initial program 99.9%
Taylor expanded in z around inf 71.0%
if -5.0000000000000002e-55 < a < 3.19999999999999985e-43Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 54.7%
Final simplification65.6%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.9%
associate-/l*99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.7e+200) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.7e+200) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / 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 <= 1.7d+200) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / 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 <= 1.7e+200) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.7e+200: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.7e+200) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.7e+200) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.7e+200], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.7 \cdot 10^{+200}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < 1.69999999999999985e200Initial program 99.9%
Taylor expanded in z around inf 55.4%
if 1.69999999999999985e200 < y Initial program 99.6%
*-commutative99.6%
associate-/l*99.4%
frac-2neg99.4%
distribute-frac-neg99.4%
div-inv99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in y around inf 75.7%
associate-*r/75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in z around 0 57.0%
Final simplification55.5%
(FPCore (x y z t a) :precision binary64 (if (<= y 2.75e+200) (* a 120.0) (* y (/ 60.0 t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.75e+200) {
tmp = a * 120.0;
} else {
tmp = 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 (y <= 2.75d+200) then
tmp = a * 120.0d0
else
tmp = 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 (y <= 2.75e+200) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 2.75e+200: tmp = a * 120.0 else: tmp = y * (60.0 / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.75e+200) tmp = Float64(a * 120.0); else tmp = Float64(y * Float64(60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 2.75e+200) tmp = a * 120.0; else tmp = y * (60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.75e+200], N[(a * 120.0), $MachinePrecision], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.75 \cdot 10^{+200}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\end{array}
\end{array}
if y < 2.75e200Initial program 99.9%
Taylor expanded in z around inf 55.4%
if 2.75e200 < y Initial program 99.6%
*-commutative99.6%
associate-/l*99.4%
frac-2neg99.4%
distribute-frac-neg99.4%
div-inv99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in y around inf 75.7%
associate-*r/75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in z around 0 57.0%
associate-*r/56.9%
associate-*l/57.1%
*-commutative57.1%
Simplified57.1%
Final simplification55.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.9%
Taylor expanded in z around inf 53.1%
Final simplification53.1%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024034
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))