
(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 (/ (- 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) 1e-158))) (+ (* x (/ 60.0 (- z t))) (* 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) <= 1e-158)) {
tmp = (x * (60.0 / (z - t))) + (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) <= 1d-158))) then
tmp = (x * (60.0d0 / (z - t))) + (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) <= 1e-158)) {
tmp = (x * (60.0 / (z - t))) + (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) <= 1e-158): tmp = (x * (60.0 / (z - t))) + (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) <= 1e-158)) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + 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) <= 1e-158))) tmp = (x * (60.0 / (z - t))) + (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], 1e-158]], $MachinePrecision]], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $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 10^{-158}\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + 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 1.00000000000000006e-158 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 88.1%
associate-*r/88.1%
associate-*l/88.1%
metadata-eval88.1%
associate-*r/88.1%
*-commutative88.1%
associate-*r/88.1%
metadata-eval88.1%
Simplified88.1%
if -1.99999999999999992e-74 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000006e-158Initial program 99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 88.1%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr88.1%
Final simplification88.1%
(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%
fma-define99.9%
Simplified99.9%
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%
fma-define99.8%
Simplified99.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%
fma-define99.9%
Simplified99.9%
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%
fma-define99.8%
Simplified99.8%
Taylor expanded in a around 0 77.1%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.06e-109)
(* a 120.0)
(if (<= a -3.4e-244)
(* 60.0 (/ (- y x) t))
(if (<= a 1.75e-160) (/ 60.0 (/ z (- x y))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.06e-109) {
tmp = a * 120.0;
} else if (a <= -3.4e-244) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 1.75e-160) {
tmp = 60.0 / (z / (x - y));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.06d-109)) then
tmp = a * 120.0d0
else if (a <= (-3.4d-244)) then
tmp = 60.0d0 * ((y - x) / t)
else if (a <= 1.75d-160) then
tmp = 60.0d0 / (z / (x - y))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.06e-109) {
tmp = a * 120.0;
} else if (a <= -3.4e-244) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 1.75e-160) {
tmp = 60.0 / (z / (x - y));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.06e-109: tmp = a * 120.0 elif a <= -3.4e-244: tmp = 60.0 * ((y - x) / t) elif a <= 1.75e-160: tmp = 60.0 / (z / (x - y)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.06e-109) tmp = Float64(a * 120.0); elseif (a <= -3.4e-244) tmp = Float64(60.0 * Float64(Float64(y - x) / t)); elseif (a <= 1.75e-160) tmp = Float64(60.0 / Float64(z / Float64(x - y))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.06e-109) tmp = a * 120.0; elseif (a <= -3.4e-244) tmp = 60.0 * ((y - x) / t); elseif (a <= 1.75e-160) tmp = 60.0 / (z / (x - y)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.06e-109], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.4e-244], N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.75e-160], N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.06 \cdot 10^{-109}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-244}:\\
\;\;\;\;60 \cdot \frac{y - x}{t}\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-160}:\\
\;\;\;\;\frac{60}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.06e-109 or 1.7500000000000001e-160 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 72.8%
if -1.06e-109 < a < -3.40000000000000009e-244Initial program 99.7%
associate-/l*99.7%
fma-define99.8%
Simplified99.8%
Taylor expanded in a around 0 93.4%
Taylor expanded in z around 0 71.0%
associate-*r/71.0%
neg-mul-171.0%
neg-sub071.0%
sub-neg71.0%
+-commutative71.0%
associate--r+71.0%
neg-sub071.0%
remove-double-neg71.0%
Simplified71.0%
if -3.40000000000000009e-244 < a < 1.7500000000000001e-160Initial program 99.5%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 90.5%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr90.5%
Taylor expanded in z around inf 64.5%
Final simplification71.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.22e-110)
(* a 120.0)
(if (<= a -1.7e-242)
(* 60.0 (/ (- y x) t))
(if (<= a 2.7e-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 <= -1.22e-110) {
tmp = a * 120.0;
} else if (a <= -1.7e-242) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 2.7e-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 <= (-1.22d-110)) then
tmp = a * 120.0d0
else if (a <= (-1.7d-242)) then
tmp = 60.0d0 * ((y - x) / t)
else if (a <= 2.7d-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 <= -1.22e-110) {
tmp = a * 120.0;
} else if (a <= -1.7e-242) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 2.7e-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 <= -1.22e-110: tmp = a * 120.0 elif a <= -1.7e-242: tmp = 60.0 * ((y - x) / t) elif a <= 2.7e-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 <= -1.22e-110) tmp = Float64(a * 120.0); elseif (a <= -1.7e-242) tmp = Float64(60.0 * Float64(Float64(y - x) / t)); elseif (a <= 2.7e-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 <= -1.22e-110) tmp = a * 120.0; elseif (a <= -1.7e-242) tmp = 60.0 * ((y - x) / t); elseif (a <= 2.7e-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, -1.22e-110], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.7e-242], N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-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 -1.22 \cdot 10^{-110}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-242}:\\
\;\;\;\;60 \cdot \frac{y - x}{t}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-160}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.22e-110 or 2.7000000000000001e-160 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 72.8%
if -1.22e-110 < a < -1.7e-242Initial program 99.7%
associate-/l*99.7%
fma-define99.8%
Simplified99.8%
Taylor expanded in a around 0 93.4%
Taylor expanded in z around 0 71.0%
associate-*r/71.0%
neg-mul-171.0%
neg-sub071.0%
sub-neg71.0%
+-commutative71.0%
associate--r+71.0%
neg-sub071.0%
remove-double-neg71.0%
Simplified71.0%
if -1.7e-242 < a < 2.7000000000000001e-160Initial program 99.5%
associate-/l*99.7%
fma-define99.7%
Simplified99.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))) (+ (* y (/ -60.0 (- z t))) (* a 120.0)) (+ (* x (/ 60.0 (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.8e+68) || !(y <= 6.4e+89)) {
tmp = (y * (-60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (x * (60.0 / (z - t))) + (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 ((y <= (-8.8d+68)) .or. (.not. (y <= 6.4d+89))) then
tmp = (y * ((-60.0d0) / (z - t))) + (a * 120.0d0)
else
tmp = (x * (60.0d0 / (z - t))) + (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 ((y <= -8.8e+68) || !(y <= 6.4e+89)) {
tmp = (y * (-60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.8e+68) or not (y <= 6.4e+89): tmp = (y * (-60.0 / (z - t))) + (a * 120.0) else: tmp = (x * (60.0 / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.8e+68) || !(y <= 6.4e+89)) tmp = Float64(Float64(y * Float64(-60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); 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 = (y * (-60.0 / (z - t))) + (a * 120.0); else tmp = (x * (60.0 / (z - t))) + (a * 120.0); 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[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $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):\\
\;\;\;\;y \cdot \frac{-60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -8.79999999999999949e68 or 6.39999999999999974e89 < y Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 95.2%
associate-*r/95.3%
*-commutative95.3%
associate-*r/95.3%
Simplified95.3%
if -8.79999999999999949e68 < y < 6.39999999999999974e89Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 95.4%
associate-*r/95.3%
associate-*l/95.3%
metadata-eval95.3%
associate-*r/95.3%
*-commutative95.3%
associate-*r/95.3%
metadata-eval95.3%
Simplified95.3%
Final simplification95.3%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.32e+69)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(if (<= y 5.2e+89)
(+ (* x (/ 60.0 (- z t))) (* a 120.0))
(+ (* y (/ -60.0 (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.32e+69) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else if (y <= 5.2e+89) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (y * (-60.0 / (z - t))) + (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 (y <= (-1.32d+69)) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else if (y <= 5.2d+89) then
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
else
tmp = (y * ((-60.0d0) / (z - t))) + (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 (y <= -1.32e+69) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else if (y <= 5.2e+89) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (y * (-60.0 / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.32e+69: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) elif y <= 5.2e+89: tmp = (x * (60.0 / (z - t))) + (a * 120.0) else: tmp = (y * (-60.0 / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.32e+69) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); elseif (y <= 5.2e+89) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(y * Float64(-60.0 / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.32e+69) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); elseif (y <= 5.2e+89) tmp = (x * (60.0 / (z - t))) + (a * 120.0); else tmp = (y * (-60.0 / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.32e+69], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+89], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+69}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+89}:\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -1.32e69Initial program 99.8%
Taylor expanded in x around 0 93.9%
if -1.32e69 < y < 5.2000000000000001e89Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 95.4%
associate-*r/95.3%
associate-*l/95.3%
metadata-eval95.3%
associate-*r/95.3%
*-commutative95.3%
associate-*r/95.3%
metadata-eval95.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.1%
associate-*r/97.2%
*-commutative97.2%
associate-*r/97.3%
Simplified97.3%
Final simplification95.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.5e-107) (not (<= a 1.6e-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 <= -8.5e-107) || !(a <= 1.6e-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 <= (-8.5d-107)) .or. (.not. (a <= 1.6d-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 <= -8.5e-107) || !(a <= 1.6e-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 <= -8.5e-107) or not (a <= 1.6e-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 <= -8.5e-107) || !(a <= 1.6e-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 <= -8.5e-107) || ~((a <= 1.6e-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, -8.5e-107], N[Not[LessEqual[a, 1.6e-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 -8.5 \cdot 10^{-107} \lor \neg \left(a \leq 1.6 \cdot 10^{-160}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if a < -8.49999999999999956e-107 or 1.60000000000000004e-160 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 72.8%
if -8.49999999999999956e-107 < a < 1.60000000000000004e-160Initial program 99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.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.1e-82) (not (<= a 2.6e-160))) (* a 120.0) (* 60.0 (/ y (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e-82) || !(a <= 2.6e-160)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.1d-82)) .or. (.not. (a <= 2.6d-160))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e-82) || !(a <= 2.6e-160)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.1e-82) or not (a <= 2.6e-160): tmp = a * 120.0 else: tmp = 60.0 * (y / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.1e-82) || !(a <= 2.6e-160)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.1e-82) || ~((a <= 2.6e-160))) tmp = a * 120.0; else tmp = 60.0 * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.1e-82], N[Not[LessEqual[a, 2.6e-160]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{-82} \lor \neg \left(a \leq 2.6 \cdot 10^{-160}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if a < -2.1e-82 or 2.60000000000000003e-160 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 73.9%
if -2.1e-82 < a < 2.60000000000000003e-160Initial program 99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 88.1%
Taylor expanded in x around 0 49.2%
associate-*r/49.2%
remove-double-neg49.2%
neg-mul-149.2%
times-frac49.2%
metadata-eval49.2%
neg-sub049.2%
sub-neg49.2%
+-commutative49.2%
associate--r+49.2%
neg-sub049.2%
remove-double-neg49.2%
Simplified49.2%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.25e-110) (not (<= a 1.25e-160))) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.25e-110) || !(a <= 1.25e-160)) {
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 ((a <= (-2.25d-110)) .or. (.not. (a <= 1.25d-160))) 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 ((a <= -2.25e-110) || !(a <= 1.25e-160)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.25e-110) or not (a <= 1.25e-160): tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.25e-110) || !(a <= 1.25e-160)) 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 ((a <= -2.25e-110) || ~((a <= 1.25e-160))) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.25e-110], N[Not[LessEqual[a, 1.25e-160]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.25 \cdot 10^{-110} \lor \neg \left(a \leq 1.25 \cdot 10^{-160}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -2.25e-110 or 1.24999999999999999e-160 < a Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 72.8%
if -2.25e-110 < a < 1.24999999999999999e-160Initial program 99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around 0 91.5%
Taylor expanded in z around 0 48.2%
associate-*r/48.2%
neg-mul-148.2%
neg-sub048.2%
sub-neg48.2%
+-commutative48.2%
associate--r+48.2%
neg-sub048.2%
remove-double-neg48.2%
Simplified48.2%
Taylor expanded in y around inf 29.3%
Final simplification62.5%
(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.7%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr99.8%
(FPCore (x y z t a) :precision binary64 (+ (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 * ((x - y) / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 * ((x - y) / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 * ((x - y) / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.35e+247) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.35e+247) {
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.35d+247) 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.35e+247) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.35e+247: 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.35e+247) 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.35e+247) 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.35e+247], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+247}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < 1.35e247Initial program 99.7%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 60.2%
if 1.35e247 < x Initial program 99.7%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around inf 86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in z around 0 65.5%
+-commutative65.5%
*-commutative65.5%
Simplified65.5%
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%
fma-define99.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)))