
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (/ eh ew) (tan t))))) (fabs (+ (* (* ew (sin t)) (cos t_1)) (* (* eh (cos t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh / ew) / tan(t)));
return fabs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((eh / ew) / tan(t)))
code = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh / ew) / Math.tan(t)));
return Math.abs((((ew * Math.sin(t)) * Math.cos(t_1)) + ((eh * Math.cos(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((eh / ew) / math.tan(t))) return math.fabs((((ew * math.sin(t)) * math.cos(t_1)) + ((eh * math.cos(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh / ew) / tan(t))) return abs(Float64(Float64(Float64(ew * sin(t)) * cos(t_1)) + Float64(Float64(eh * cos(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((eh / ew) / tan(t))); tmp = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\left|\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (/ eh ew) (tan t))))) (fabs (+ (* (* ew (sin t)) (cos t_1)) (* (* eh (cos t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh / ew) / tan(t)));
return fabs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((eh / ew) / tan(t)))
code = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh / ew) / Math.tan(t)));
return Math.abs((((ew * Math.sin(t)) * Math.cos(t_1)) + ((eh * Math.cos(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((eh / ew) / math.tan(t))) return math.fabs((((ew * math.sin(t)) * math.cos(t_1)) + ((eh * math.cos(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh / ew) / tan(t))) return abs(Float64(Float64(Float64(ew * sin(t)) * cos(t_1)) + Float64(Float64(eh * cos(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((eh / ew) / tan(t))); tmp = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\left|\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (/ eh (tan t)) ew)))
(fabs
(fma
(* (cos t) eh)
(sin (atan t_1))
(* (pow (sqrt (+ (pow t_1 2.0) 1.0)) -1.0) (* (sin t) ew))))))
double code(double eh, double ew, double t) {
double t_1 = (eh / tan(t)) / ew;
return fabs(fma((cos(t) * eh), sin(atan(t_1)), (pow(sqrt((pow(t_1, 2.0) + 1.0)), -1.0) * (sin(t) * ew))));
}
function code(eh, ew, t) t_1 = Float64(Float64(eh / tan(t)) / ew) return abs(fma(Float64(cos(t) * eh), sin(atan(t_1)), Float64((sqrt(Float64((t_1 ^ 2.0) + 1.0)) ^ -1.0) * Float64(sin(t) * ew)))) end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision] + N[(N[Power[N[Sqrt[N[(N[Power[t$95$1, 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision], -1.0], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
\left|\mathsf{fma}\left(\cos t \cdot eh, \sin \tan^{-1} t\_1, {\left(\sqrt{{t\_1}^{2} + 1}\right)}^{-1} \cdot \left(\sin t \cdot ew\right)\right)\right|
\end{array}
\end{array}
Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.8
lift-*.f64N/A
Applied rewrites99.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
lift-cos.f64N/A
lift-atan.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lift-/.f64N/A
lift-/.f64N/A
cos-atanN/A
lower-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites99.8%
Final simplification99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (cos t) eh)))
(if (or (<= eh -4.9e+117) (not (<= eh 1e+120)))
(fabs
(* t_1 (sin (atan (/ (/ (fma (* -0.5 eh) (* t t) eh) ew) (sin t))))))
(fabs
(fma
t_1
(sin
(atan (/ (fma (* eh (/ (* t t) ew)) -0.3333333333333333 (/ eh ew)) t)))
(*
(pow (sqrt (+ (pow (/ (/ eh (tan t)) ew) 2.0) 1.0)) -1.0)
(* (sin t) ew)))))))
double code(double eh, double ew, double t) {
double t_1 = cos(t) * eh;
double tmp;
if ((eh <= -4.9e+117) || !(eh <= 1e+120)) {
tmp = fabs((t_1 * sin(atan(((fma((-0.5 * eh), (t * t), eh) / ew) / sin(t))))));
} else {
tmp = fabs(fma(t_1, sin(atan((fma((eh * ((t * t) / ew)), -0.3333333333333333, (eh / ew)) / t))), (pow(sqrt((pow(((eh / tan(t)) / ew), 2.0) + 1.0)), -1.0) * (sin(t) * ew))));
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(cos(t) * eh) tmp = 0.0 if ((eh <= -4.9e+117) || !(eh <= 1e+120)) tmp = abs(Float64(t_1 * sin(atan(Float64(Float64(fma(Float64(-0.5 * eh), Float64(t * t), eh) / ew) / sin(t)))))); else tmp = abs(fma(t_1, sin(atan(Float64(fma(Float64(eh * Float64(Float64(t * t) / ew)), -0.3333333333333333, Float64(eh / ew)) / t))), Float64((sqrt(Float64((Float64(Float64(eh / tan(t)) / ew) ^ 2.0) + 1.0)) ^ -1.0) * Float64(sin(t) * ew)))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision]}, If[Or[LessEqual[eh, -4.9e+117], N[Not[LessEqual[eh, 1e+120]], $MachinePrecision]], N[Abs[N[(t$95$1 * N[Sin[N[ArcTan[N[(N[(N[(N[(-0.5 * eh), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / ew), $MachinePrecision] / N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$1 * N[Sin[N[ArcTan[N[(N[(N[(eh * N[(N[(t * t), $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333 + N[(eh / ew), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + N[(N[Power[N[Sqrt[N[(N[Power[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision], -1.0], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \cos t \cdot eh\\
\mathbf{if}\;eh \leq -4.9 \cdot 10^{+117} \lor \neg \left(eh \leq 10^{+120}\right):\\
\;\;\;\;\left|t\_1 \cdot \sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(-0.5 \cdot eh, t \cdot t, eh\right)}{ew}}{\sin t}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(t\_1, \sin \tan^{-1} \left(\frac{\mathsf{fma}\left(eh \cdot \frac{t \cdot t}{ew}, -0.3333333333333333, \frac{eh}{ew}\right)}{t}\right), {\left(\sqrt{{\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2} + 1}\right)}^{-1} \cdot \left(\sin t \cdot ew\right)\right)\right|\\
\end{array}
\end{array}
if eh < -4.9000000000000001e117 or 9.9999999999999998e119 < eh Initial program 99.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.9
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.9
lift-*.f64N/A
Applied rewrites99.9%
Taylor expanded in eh around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6496.2
Applied rewrites96.2%
Taylor expanded in t around 0
Applied rewrites96.2%
if -4.9000000000000001e117 < eh < 9.9999999999999998e119Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.8
lift-*.f64N/A
Applied rewrites99.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
lift-cos.f64N/A
lift-atan.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lift-/.f64N/A
lift-/.f64N/A
cos-atanN/A
lower-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites99.8%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f6498.0
Applied rewrites98.0%
Final simplification97.4%
(FPCore (eh ew t) :precision binary64 (fabs (fma (* (cos t) eh) (sin (atan (/ (/ (fma (* (* t t) eh) -0.3333333333333333 eh) t) ew))) (* (cos (atan (/ eh (* ew (tan t))))) (* (sin t) ew)))))
double code(double eh, double ew, double t) {
return fabs(fma((cos(t) * eh), sin(atan(((fma(((t * t) * eh), -0.3333333333333333, eh) / t) / ew))), (cos(atan((eh / (ew * tan(t))))) * (sin(t) * ew))));
}
function code(eh, ew, t) return abs(fma(Float64(cos(t) * eh), sin(atan(Float64(Float64(fma(Float64(Float64(t * t) * eh), -0.3333333333333333, eh) / t) / ew))), Float64(cos(atan(Float64(eh / Float64(ew * tan(t))))) * Float64(sin(t) * ew)))) end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[(N[(N[(t * t), $MachinePrecision] * eh), $MachinePrecision] * -0.3333333333333333 + eh), $MachinePrecision] / t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + N[(N[Cos[N[ArcTan[N[(eh / N[(ew * N[Tan[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(\cos t \cdot eh, \sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(\left(t \cdot t\right) \cdot eh, -0.3333333333333333, eh\right)}{t}}{ew}\right), \cos \tan^{-1} \left(\frac{eh}{ew \cdot \tan t}\right) \cdot \left(\sin t \cdot ew\right)\right)\right|
\end{array}
Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.8
lift-*.f64N/A
Applied rewrites99.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
Taylor expanded in t around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6499.7
Applied rewrites99.7%
(FPCore (eh ew t) :precision binary64 (fabs (fma (* (cos t) eh) (sin (atan (/ (/ eh (tan t)) ew))) (* (cos (atan (/ (/ eh t) ew))) (* (sin t) ew)))))
double code(double eh, double ew, double t) {
return fabs(fma((cos(t) * eh), sin(atan(((eh / tan(t)) / ew))), (cos(atan(((eh / t) / ew))) * (sin(t) * ew))));
}
function code(eh, ew, t) return abs(fma(Float64(cos(t) * eh), sin(atan(Float64(Float64(eh / tan(t)) / ew))), Float64(cos(atan(Float64(Float64(eh / t) / ew))) * Float64(sin(t) * ew)))) end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + N[(N[Cos[N[ArcTan[N[(N[(eh / t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(\cos t \cdot eh, \sin \tan^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right), \cos \tan^{-1} \left(\frac{\frac{eh}{t}}{ew}\right) \cdot \left(\sin t \cdot ew\right)\right)\right|
\end{array}
Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.8
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in t around 0
lower-/.f6499.4
Applied rewrites99.4%
(FPCore (eh ew t)
:precision binary64
(if (or (<= eh -2.6e+60) (not (<= eh 5.4e+35)))
(fabs
(*
(* (cos t) eh)
(sin (atan (/ (/ (fma (* -0.5 eh) (* t t) eh) ew) (sin t))))))
(fabs
(*
(fma
eh
(/ (* (sin (atan (* (/ eh (sin t)) (/ (cos t) ew)))) (cos t)) ew)
(sin t))
ew))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.6e+60) || !(eh <= 5.4e+35)) {
tmp = fabs(((cos(t) * eh) * sin(atan(((fma((-0.5 * eh), (t * t), eh) / ew) / sin(t))))));
} else {
tmp = fabs((fma(eh, ((sin(atan(((eh / sin(t)) * (cos(t) / ew)))) * cos(t)) / ew), sin(t)) * ew));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((eh <= -2.6e+60) || !(eh <= 5.4e+35)) tmp = abs(Float64(Float64(cos(t) * eh) * sin(atan(Float64(Float64(fma(Float64(-0.5 * eh), Float64(t * t), eh) / ew) / sin(t)))))); else tmp = abs(Float64(fma(eh, Float64(Float64(sin(atan(Float64(Float64(eh / sin(t)) * Float64(cos(t) / ew)))) * cos(t)) / ew), sin(t)) * ew)); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.6e+60], N[Not[LessEqual[eh, 5.4e+35]], $MachinePrecision]], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[(N[(-0.5 * eh), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / ew), $MachinePrecision] / N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(eh * N[(N[(N[Sin[N[ArcTan[N[(N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] + N[Sin[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.6 \cdot 10^{+60} \lor \neg \left(eh \leq 5.4 \cdot 10^{+35}\right):\\
\;\;\;\;\left|\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(-0.5 \cdot eh, t \cdot t, eh\right)}{ew}}{\sin t}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(eh, \frac{\sin \tan^{-1} \left(\frac{eh}{\sin t} \cdot \frac{\cos t}{ew}\right) \cdot \cos t}{ew}, \sin t\right) \cdot ew\right|\\
\end{array}
\end{array}
if eh < -2.60000000000000008e60 or 5.40000000000000005e35 < eh Initial program 99.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.9
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.9
lift-*.f64N/A
Applied rewrites99.9%
Taylor expanded in eh around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6492.8
Applied rewrites92.8%
Taylor expanded in t around 0
Applied rewrites92.9%
if -2.60000000000000008e60 < eh < 5.40000000000000005e35Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.8
lift-*.f64N/A
Applied rewrites99.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
lift-cos.f64N/A
lift-atan.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lift-/.f64N/A
lift-/.f64N/A
cos-atanN/A
lower-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites99.8%
Taylor expanded in ew around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites98.0%
Final simplification95.9%
(FPCore (eh ew t)
:precision binary64
(if (or (<= eh -5.6e-185) (not (<= eh 1.95e-100)))
(fabs
(*
(* (cos t) eh)
(sin (atan (/ (/ (fma (* -0.5 eh) (* t t) eh) ew) (sin t))))))
(fabs (* (cos (atan (* (/ (/ eh (sin t)) ew) (cos t)))) (* (sin t) ew)))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -5.6e-185) || !(eh <= 1.95e-100)) {
tmp = fabs(((cos(t) * eh) * sin(atan(((fma((-0.5 * eh), (t * t), eh) / ew) / sin(t))))));
} else {
tmp = fabs((cos(atan((((eh / sin(t)) / ew) * cos(t)))) * (sin(t) * ew)));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((eh <= -5.6e-185) || !(eh <= 1.95e-100)) tmp = abs(Float64(Float64(cos(t) * eh) * sin(atan(Float64(Float64(fma(Float64(-0.5 * eh), Float64(t * t), eh) / ew) / sin(t)))))); else tmp = abs(Float64(cos(atan(Float64(Float64(Float64(eh / sin(t)) / ew) * cos(t)))) * Float64(sin(t) * ew))); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -5.6e-185], N[Not[LessEqual[eh, 1.95e-100]], $MachinePrecision]], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[(N[(-0.5 * eh), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / ew), $MachinePrecision] / N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Cos[N[ArcTan[N[(N[(N[(eh / N[Sin[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -5.6 \cdot 10^{-185} \lor \neg \left(eh \leq 1.95 \cdot 10^{-100}\right):\\
\;\;\;\;\left|\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(-0.5 \cdot eh, t \cdot t, eh\right)}{ew}}{\sin t}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\cos \tan^{-1} \left(\frac{\frac{eh}{\sin t}}{ew} \cdot \cos t\right) \cdot \left(\sin t \cdot ew\right)\right|\\
\end{array}
\end{array}
if eh < -5.59999999999999983e-185 or 1.94999999999999989e-100 < eh Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.9
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.9
lift-*.f64N/A
Applied rewrites99.9%
Taylor expanded in eh around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6480.0
Applied rewrites80.0%
Taylor expanded in t around 0
Applied rewrites80.3%
if -5.59999999999999983e-185 < eh < 1.94999999999999989e-100Initial program 99.7%
Taylor expanded in eh around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.2%
Final simplification80.0%
(FPCore (eh ew t)
:precision binary64
(if (or (<= eh -5.6e-185) (not (<= eh 1.95e-100)))
(fabs
(*
(* (cos t) eh)
(sin (atan (/ (/ (fma (* -0.5 eh) (* t t) eh) ew) (sin t))))))
(fabs (/ (* (sin t) ew) (sqrt (+ (pow (/ (/ eh (tan t)) ew) 2.0) 1.0))))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -5.6e-185) || !(eh <= 1.95e-100)) {
tmp = fabs(((cos(t) * eh) * sin(atan(((fma((-0.5 * eh), (t * t), eh) / ew) / sin(t))))));
} else {
tmp = fabs(((sin(t) * ew) / sqrt((pow(((eh / tan(t)) / ew), 2.0) + 1.0))));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((eh <= -5.6e-185) || !(eh <= 1.95e-100)) tmp = abs(Float64(Float64(cos(t) * eh) * sin(atan(Float64(Float64(fma(Float64(-0.5 * eh), Float64(t * t), eh) / ew) / sin(t)))))); else tmp = abs(Float64(Float64(sin(t) * ew) / sqrt(Float64((Float64(Float64(eh / tan(t)) / ew) ^ 2.0) + 1.0)))); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -5.6e-185], N[Not[LessEqual[eh, 1.95e-100]], $MachinePrecision]], N[Abs[N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(N[(N[(-0.5 * eh), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / ew), $MachinePrecision] / N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision] / N[Sqrt[N[(N[Power[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -5.6 \cdot 10^{-185} \lor \neg \left(eh \leq 1.95 \cdot 10^{-100}\right):\\
\;\;\;\;\left|\left(\cos t \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(-0.5 \cdot eh, t \cdot t, eh\right)}{ew}}{\sin t}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\sin t \cdot ew}{\sqrt{{\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2} + 1}}\right|\\
\end{array}
\end{array}
if eh < -5.59999999999999983e-185 or 1.94999999999999989e-100 < eh Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.9
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.9
lift-*.f64N/A
Applied rewrites99.9%
Taylor expanded in eh around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6480.0
Applied rewrites80.0%
Taylor expanded in t around 0
Applied rewrites80.3%
if -5.59999999999999983e-185 < eh < 1.94999999999999989e-100Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.7
lift-*.f64N/A
Applied rewrites99.7%
Taylor expanded in eh around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f64N/A
lower-sin.f6479.2
Applied rewrites79.2%
Applied rewrites79.2%
Final simplification80.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (/ eh (tan t)) ew)))
(if (or (<= eh -5.6e-185) (not (<= eh 1.95e-100)))
(fabs (* (* (sin (atan t_1)) (cos t)) eh))
(fabs (/ (* (sin t) ew) (sqrt (+ (pow t_1 2.0) 1.0)))))))
double code(double eh, double ew, double t) {
double t_1 = (eh / tan(t)) / ew;
double tmp;
if ((eh <= -5.6e-185) || !(eh <= 1.95e-100)) {
tmp = fabs(((sin(atan(t_1)) * cos(t)) * eh));
} else {
tmp = fabs(((sin(t) * ew) / sqrt((pow(t_1, 2.0) + 1.0))));
}
return tmp;
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (eh / tan(t)) / ew
if ((eh <= (-5.6d-185)) .or. (.not. (eh <= 1.95d-100))) then
tmp = abs(((sin(atan(t_1)) * cos(t)) * eh))
else
tmp = abs(((sin(t) * ew) / sqrt(((t_1 ** 2.0d0) + 1.0d0))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = (eh / Math.tan(t)) / ew;
double tmp;
if ((eh <= -5.6e-185) || !(eh <= 1.95e-100)) {
tmp = Math.abs(((Math.sin(Math.atan(t_1)) * Math.cos(t)) * eh));
} else {
tmp = Math.abs(((Math.sin(t) * ew) / Math.sqrt((Math.pow(t_1, 2.0) + 1.0))));
}
return tmp;
}
def code(eh, ew, t): t_1 = (eh / math.tan(t)) / ew tmp = 0 if (eh <= -5.6e-185) or not (eh <= 1.95e-100): tmp = math.fabs(((math.sin(math.atan(t_1)) * math.cos(t)) * eh)) else: tmp = math.fabs(((math.sin(t) * ew) / math.sqrt((math.pow(t_1, 2.0) + 1.0)))) return tmp
function code(eh, ew, t) t_1 = Float64(Float64(eh / tan(t)) / ew) tmp = 0.0 if ((eh <= -5.6e-185) || !(eh <= 1.95e-100)) tmp = abs(Float64(Float64(sin(atan(t_1)) * cos(t)) * eh)); else tmp = abs(Float64(Float64(sin(t) * ew) / sqrt(Float64((t_1 ^ 2.0) + 1.0)))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = (eh / tan(t)) / ew; tmp = 0.0; if ((eh <= -5.6e-185) || ~((eh <= 1.95e-100))) tmp = abs(((sin(atan(t_1)) * cos(t)) * eh)); else tmp = abs(((sin(t) * ew) / sqrt(((t_1 ^ 2.0) + 1.0)))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, If[Or[LessEqual[eh, -5.6e-185], N[Not[LessEqual[eh, 1.95e-100]], $MachinePrecision]], N[Abs[N[(N[(N[Sin[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision] / N[Sqrt[N[(N[Power[t$95$1, 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{eh}{\tan t}}{ew}\\
\mathbf{if}\;eh \leq -5.6 \cdot 10^{-185} \lor \neg \left(eh \leq 1.95 \cdot 10^{-100}\right):\\
\;\;\;\;\left|\left(\sin \tan^{-1} t\_1 \cdot \cos t\right) \cdot eh\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\sin t \cdot ew}{\sqrt{{t\_1}^{2} + 1}}\right|\\
\end{array}
\end{array}
if eh < -5.59999999999999983e-185 or 1.94999999999999989e-100 < eh Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.9
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.9
lift-*.f64N/A
Applied rewrites99.9%
Taylor expanded in eh around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6480.0
Applied rewrites80.0%
Applied rewrites80.0%
if -5.59999999999999983e-185 < eh < 1.94999999999999989e-100Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.7
lift-*.f64N/A
Applied rewrites99.7%
Taylor expanded in eh around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f64N/A
lower-sin.f6479.2
Applied rewrites79.2%
Applied rewrites79.2%
Final simplification79.8%
(FPCore (eh ew t)
:precision binary64
(if (or (<= t -0.0042) (not (<= t 3.8e-10)))
(fabs (/ (* (sin t) ew) (sqrt (+ (pow (/ (/ eh (tan t)) ew) 2.0) 1.0))))
(fabs
(*
(sin
(atan
(*
(/
(/
(fma
(fma
(fma
(* (- t) t)
(fma
-0.0001984126984126984
eh
(fma
(* eh -0.019444444444444445)
0.16666666666666666
(* 0.001388888888888889 eh)))
(* (- eh) -0.019444444444444445))
(* t t)
(* 0.16666666666666666 eh))
(* t t)
eh)
t)
ew)
1.0)))
eh))))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -0.0042) || !(t <= 3.8e-10)) {
tmp = fabs(((sin(t) * ew) / sqrt((pow(((eh / tan(t)) / ew), 2.0) + 1.0))));
} else {
tmp = fabs((sin(atan((((fma(fma(fma((-t * t), fma(-0.0001984126984126984, eh, fma((eh * -0.019444444444444445), 0.16666666666666666, (0.001388888888888889 * eh))), (-eh * -0.019444444444444445)), (t * t), (0.16666666666666666 * eh)), (t * t), eh) / t) / ew) * 1.0))) * eh));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((t <= -0.0042) || !(t <= 3.8e-10)) tmp = abs(Float64(Float64(sin(t) * ew) / sqrt(Float64((Float64(Float64(eh / tan(t)) / ew) ^ 2.0) + 1.0)))); else tmp = abs(Float64(sin(atan(Float64(Float64(Float64(fma(fma(fma(Float64(Float64(-t) * t), fma(-0.0001984126984126984, eh, fma(Float64(eh * -0.019444444444444445), 0.16666666666666666, Float64(0.001388888888888889 * eh))), Float64(Float64(-eh) * -0.019444444444444445)), Float64(t * t), Float64(0.16666666666666666 * eh)), Float64(t * t), eh) / t) / ew) * 1.0))) * eh)); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -0.0042], N[Not[LessEqual[t, 3.8e-10]], $MachinePrecision]], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision] / N[Sqrt[N[(N[Power[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(N[(N[(N[(N[((-t) * t), $MachinePrecision] * N[(-0.0001984126984126984 * eh + N[(N[(eh * -0.019444444444444445), $MachinePrecision] * 0.16666666666666666 + N[(0.001388888888888889 * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-eh) * -0.019444444444444445), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(0.16666666666666666 * eh), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / t), $MachinePrecision] / ew), $MachinePrecision] * 1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0042 \lor \neg \left(t \leq 3.8 \cdot 10^{-10}\right):\\
\;\;\;\;\left|\frac{\sin t \cdot ew}{\sqrt{{\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2} + 1}}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\left(-t\right) \cdot t, \mathsf{fma}\left(-0.0001984126984126984, eh, \mathsf{fma}\left(eh \cdot -0.019444444444444445, 0.16666666666666666, 0.001388888888888889 \cdot eh\right)\right), \left(-eh\right) \cdot -0.019444444444444445\right), t \cdot t, 0.16666666666666666 \cdot eh\right), t \cdot t, eh\right)}{t}}{ew} \cdot 1\right) \cdot eh\right|\\
\end{array}
\end{array}
if t < -0.00419999999999999974 or 3.7999999999999998e-10 < t Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.7
lift-*.f64N/A
Applied rewrites99.7%
Taylor expanded in eh around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f64N/A
lower-sin.f6450.6
Applied rewrites50.6%
Applied rewrites50.2%
if -0.00419999999999999974 < t < 3.7999999999999998e-10Initial program 100.0%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6482.4
Applied rewrites82.4%
Taylor expanded in t around 0
Applied rewrites82.4%
Taylor expanded in t around 0
Applied rewrites82.4%
Final simplification65.6%
(FPCore (eh ew t)
:precision binary64
(fabs
(*
(sin
(atan
(*
(/
(/
(fma
(fma
(fma
(* (- t) t)
(fma
-0.0001984126984126984
eh
(fma
(* eh -0.019444444444444445)
0.16666666666666666
(* 0.001388888888888889 eh)))
(* (- eh) -0.019444444444444445))
(* t t)
(* 0.16666666666666666 eh))
(* t t)
eh)
t)
ew)
(fma
(fma
(fma -0.001388888888888889 (* t t) 0.041666666666666664)
(* t t)
-0.5)
(* t t)
1.0))))
eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan((((fma(fma(fma((-t * t), fma(-0.0001984126984126984, eh, fma((eh * -0.019444444444444445), 0.16666666666666666, (0.001388888888888889 * eh))), (-eh * -0.019444444444444445)), (t * t), (0.16666666666666666 * eh)), (t * t), eh) / t) / ew) * fma(fma(fma(-0.001388888888888889, (t * t), 0.041666666666666664), (t * t), -0.5), (t * t), 1.0)))) * eh));
}
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(Float64(fma(fma(fma(Float64(Float64(-t) * t), fma(-0.0001984126984126984, eh, fma(Float64(eh * -0.019444444444444445), 0.16666666666666666, Float64(0.001388888888888889 * eh))), Float64(Float64(-eh) * -0.019444444444444445)), Float64(t * t), Float64(0.16666666666666666 * eh)), Float64(t * t), eh) / t) / ew) * fma(fma(fma(-0.001388888888888889, Float64(t * t), 0.041666666666666664), Float64(t * t), -0.5), Float64(t * t), 1.0)))) * eh)) end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(N[(N[(N[(N[((-t) * t), $MachinePrecision] * N[(-0.0001984126984126984 * eh + N[(N[(eh * -0.019444444444444445), $MachinePrecision] * 0.16666666666666666 + N[(0.001388888888888889 * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-eh) * -0.019444444444444445), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(0.16666666666666666 * eh), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / t), $MachinePrecision] / ew), $MachinePrecision] * N[(N[(N[(-0.001388888888888889 * N[(t * t), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] * N[(t * t), $MachinePrecision] + -0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\left(-t\right) \cdot t, \mathsf{fma}\left(-0.0001984126984126984, eh, \mathsf{fma}\left(eh \cdot -0.019444444444444445, 0.16666666666666666, 0.001388888888888889 \cdot eh\right)\right), \left(-eh\right) \cdot -0.019444444444444445\right), t \cdot t, 0.16666666666666666 \cdot eh\right), t \cdot t, eh\right)}{t}}{ew} \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001388888888888889, t \cdot t, 0.041666666666666664\right), t \cdot t, -0.5\right), t \cdot t, 1\right)\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites46.2%
Taylor expanded in t around 0
Applied rewrites46.2%
Final simplification46.2%
(FPCore (eh ew t)
:precision binary64
(fabs
(*
(sin
(atan
(*
(/
(/
(fma
(fma
(fma
(* (- t) t)
(fma
-0.0001984126984126984
eh
(fma
(* eh -0.019444444444444445)
0.16666666666666666
(* 0.001388888888888889 eh)))
(* (- eh) -0.019444444444444445))
(* t t)
(* 0.16666666666666666 eh))
(* t t)
eh)
t)
ew)
(fma (fma 0.041666666666666664 (* t t) -0.5) (* t t) 1.0))))
eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan((((fma(fma(fma((-t * t), fma(-0.0001984126984126984, eh, fma((eh * -0.019444444444444445), 0.16666666666666666, (0.001388888888888889 * eh))), (-eh * -0.019444444444444445)), (t * t), (0.16666666666666666 * eh)), (t * t), eh) / t) / ew) * fma(fma(0.041666666666666664, (t * t), -0.5), (t * t), 1.0)))) * eh));
}
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(Float64(fma(fma(fma(Float64(Float64(-t) * t), fma(-0.0001984126984126984, eh, fma(Float64(eh * -0.019444444444444445), 0.16666666666666666, Float64(0.001388888888888889 * eh))), Float64(Float64(-eh) * -0.019444444444444445)), Float64(t * t), Float64(0.16666666666666666 * eh)), Float64(t * t), eh) / t) / ew) * fma(fma(0.041666666666666664, Float64(t * t), -0.5), Float64(t * t), 1.0)))) * eh)) end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(N[(N[(N[(N[((-t) * t), $MachinePrecision] * N[(-0.0001984126984126984 * eh + N[(N[(eh * -0.019444444444444445), $MachinePrecision] * 0.16666666666666666 + N[(0.001388888888888889 * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-eh) * -0.019444444444444445), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(0.16666666666666666 * eh), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / t), $MachinePrecision] / ew), $MachinePrecision] * N[(N[(0.041666666666666664 * N[(t * t), $MachinePrecision] + -0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\left(-t\right) \cdot t, \mathsf{fma}\left(-0.0001984126984126984, eh, \mathsf{fma}\left(eh \cdot -0.019444444444444445, 0.16666666666666666, 0.001388888888888889 \cdot eh\right)\right), \left(-eh\right) \cdot -0.019444444444444445\right), t \cdot t, 0.16666666666666666 \cdot eh\right), t \cdot t, eh\right)}{t}}{ew} \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.041666666666666664, t \cdot t, -0.5\right), t \cdot t, 1\right)\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites46.2%
Taylor expanded in t around 0
Applied rewrites46.2%
Final simplification46.2%
(FPCore (eh ew t)
:precision binary64
(fabs
(*
(sin
(atan
(*
(/
(/
(fma
(fma
(fma
(* (- t) t)
(fma
-0.0001984126984126984
eh
(fma
(* eh -0.019444444444444445)
0.16666666666666666
(* 0.001388888888888889 eh)))
(* (- eh) -0.019444444444444445))
(* t t)
(* 0.16666666666666666 eh))
(* t t)
eh)
t)
ew)
(fma -0.5 (* t t) 1.0))))
eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan((((fma(fma(fma((-t * t), fma(-0.0001984126984126984, eh, fma((eh * -0.019444444444444445), 0.16666666666666666, (0.001388888888888889 * eh))), (-eh * -0.019444444444444445)), (t * t), (0.16666666666666666 * eh)), (t * t), eh) / t) / ew) * fma(-0.5, (t * t), 1.0)))) * eh));
}
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(Float64(fma(fma(fma(Float64(Float64(-t) * t), fma(-0.0001984126984126984, eh, fma(Float64(eh * -0.019444444444444445), 0.16666666666666666, Float64(0.001388888888888889 * eh))), Float64(Float64(-eh) * -0.019444444444444445)), Float64(t * t), Float64(0.16666666666666666 * eh)), Float64(t * t), eh) / t) / ew) * fma(-0.5, Float64(t * t), 1.0)))) * eh)) end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(N[(N[(N[(N[((-t) * t), $MachinePrecision] * N[(-0.0001984126984126984 * eh + N[(N[(eh * -0.019444444444444445), $MachinePrecision] * 0.16666666666666666 + N[(0.001388888888888889 * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-eh) * -0.019444444444444445), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(0.16666666666666666 * eh), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / t), $MachinePrecision] / ew), $MachinePrecision] * N[(-0.5 * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\left(-t\right) \cdot t, \mathsf{fma}\left(-0.0001984126984126984, eh, \mathsf{fma}\left(eh \cdot -0.019444444444444445, 0.16666666666666666, 0.001388888888888889 \cdot eh\right)\right), \left(-eh\right) \cdot -0.019444444444444445\right), t \cdot t, 0.16666666666666666 \cdot eh\right), t \cdot t, eh\right)}{t}}{ew} \cdot \mathsf{fma}\left(-0.5, t \cdot t, 1\right)\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites46.2%
Taylor expanded in t around 0
Applied rewrites46.2%
Final simplification46.2%
(FPCore (eh ew t)
:precision binary64
(fabs
(*
(sin
(atan
(*
(/
(/
(fma
(fma
(fma
(* (- t) t)
(fma
-0.0001984126984126984
eh
(fma
(* eh -0.019444444444444445)
0.16666666666666666
(* 0.001388888888888889 eh)))
(* (- eh) -0.019444444444444445))
(* t t)
(* 0.16666666666666666 eh))
(* t t)
eh)
t)
ew)
1.0)))
eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan((((fma(fma(fma((-t * t), fma(-0.0001984126984126984, eh, fma((eh * -0.019444444444444445), 0.16666666666666666, (0.001388888888888889 * eh))), (-eh * -0.019444444444444445)), (t * t), (0.16666666666666666 * eh)), (t * t), eh) / t) / ew) * 1.0))) * eh));
}
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(Float64(fma(fma(fma(Float64(Float64(-t) * t), fma(-0.0001984126984126984, eh, fma(Float64(eh * -0.019444444444444445), 0.16666666666666666, Float64(0.001388888888888889 * eh))), Float64(Float64(-eh) * -0.019444444444444445)), Float64(t * t), Float64(0.16666666666666666 * eh)), Float64(t * t), eh) / t) / ew) * 1.0))) * eh)) end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(N[(N[(N[(N[((-t) * t), $MachinePrecision] * N[(-0.0001984126984126984 * eh + N[(N[(eh * -0.019444444444444445), $MachinePrecision] * 0.16666666666666666 + N[(0.001388888888888889 * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-eh) * -0.019444444444444445), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(0.16666666666666666 * eh), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / t), $MachinePrecision] / ew), $MachinePrecision] * 1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\left(-t\right) \cdot t, \mathsf{fma}\left(-0.0001984126984126984, eh, \mathsf{fma}\left(eh \cdot -0.019444444444444445, 0.16666666666666666, 0.001388888888888889 \cdot eh\right)\right), \left(-eh\right) \cdot -0.019444444444444445\right), t \cdot t, 0.16666666666666666 \cdot eh\right), t \cdot t, eh\right)}{t}}{ew} \cdot 1\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites46.2%
Taylor expanded in t around 0
Applied rewrites46.2%
Final simplification46.2%
(FPCore (eh ew t)
:precision binary64
(fabs
(*
(sin
(atan
(/
(/
(fma
(fma (* eh -0.022222222222222223) (* t t) (* -0.3333333333333333 eh))
(* t t)
eh)
ew)
t)))
eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan(((fma(fma((eh * -0.022222222222222223), (t * t), (-0.3333333333333333 * eh)), (t * t), eh) / ew) / t))) * eh));
}
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(fma(fma(Float64(eh * -0.022222222222222223), Float64(t * t), Float64(-0.3333333333333333 * eh)), Float64(t * t), eh) / ew) / t))) * eh)) end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(N[(N[(eh * -0.022222222222222223), $MachinePrecision] * N[(t * t), $MachinePrecision] + N[(-0.3333333333333333 * eh), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + eh), $MachinePrecision] / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(eh \cdot -0.022222222222222223, t \cdot t, -0.3333333333333333 \cdot eh\right), t \cdot t, eh\right)}{ew}}{t}\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites38.1%
Taylor expanded in t around 0
Applied rewrites38.1%
Taylor expanded in ew around 0
Applied rewrites46.2%
Final simplification46.2%
(FPCore (eh ew t) :precision binary64 (fabs (* (sin (atan (/ (/ (fma (* (* t t) eh) -0.3333333333333333 eh) ew) t))) eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan(((fma(((t * t) * eh), -0.3333333333333333, eh) / ew) / t))) * eh));
}
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(fma(Float64(Float64(t * t) * eh), -0.3333333333333333, eh) / ew) / t))) * eh)) end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(N[(N[(t * t), $MachinePrecision] * eh), $MachinePrecision] * -0.3333333333333333 + eh), $MachinePrecision] / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\frac{\mathsf{fma}\left(\left(t \cdot t\right) \cdot eh, -0.3333333333333333, eh\right)}{ew}}{t}\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites38.1%
Taylor expanded in ew around 0
Applied rewrites46.2%
Final simplification46.2%
(FPCore (eh ew t) :precision binary64 (fabs (* (sin (atan (/ (/ eh ew) t))) eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan(((eh / ew) / t))) * eh));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((sin(atan(((eh / ew) / t))) * eh))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((Math.sin(Math.atan(((eh / ew) / t))) * eh));
}
def code(eh, ew, t): return math.fabs((math.sin(math.atan(((eh / ew) / t))) * eh))
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(eh / ew) / t))) * eh)) end
function tmp = code(eh, ew, t) tmp = abs((sin(atan(((eh / ew) / t))) * eh)); end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites38.1%
Taylor expanded in t around 0
Applied rewrites44.1%
Final simplification44.1%
(FPCore (eh ew t) :precision binary64 (fabs (* (sin (atan (* (* -0.3333333333333333 (/ eh ew)) t))) eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan(((-0.3333333333333333 * (eh / ew)) * t))) * eh));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((sin(atan((((-0.3333333333333333d0) * (eh / ew)) * t))) * eh))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((Math.sin(Math.atan(((-0.3333333333333333 * (eh / ew)) * t))) * eh));
}
def code(eh, ew, t): return math.fabs((math.sin(math.atan(((-0.3333333333333333 * (eh / ew)) * t))) * eh))
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(-0.3333333333333333 * Float64(eh / ew)) * t))) * eh)) end
function tmp = code(eh, ew, t) tmp = abs((sin(atan(((-0.3333333333333333 * (eh / ew)) * t))) * eh)); end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(-0.3333333333333333 * N[(eh / ew), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\left(-0.3333333333333333 \cdot \frac{eh}{ew}\right) \cdot t\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites38.1%
Taylor expanded in t around inf
Applied rewrites23.0%
Final simplification23.0%
(FPCore (eh ew t) :precision binary64 (fabs (* (sin (atan (* (/ (* t eh) ew) -0.3333333333333333))) eh)))
double code(double eh, double ew, double t) {
return fabs((sin(atan((((t * eh) / ew) * -0.3333333333333333))) * eh));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((sin(atan((((t * eh) / ew) * (-0.3333333333333333d0)))) * eh))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((Math.sin(Math.atan((((t * eh) / ew) * -0.3333333333333333))) * eh));
}
def code(eh, ew, t): return math.fabs((math.sin(math.atan((((t * eh) / ew) * -0.3333333333333333))) * eh))
function code(eh, ew, t) return abs(Float64(sin(atan(Float64(Float64(Float64(t * eh) / ew) * -0.3333333333333333))) * eh)) end
function tmp = code(eh, ew, t) tmp = abs((sin(atan((((t * eh) / ew) * -0.3333333333333333))) * eh)); end
code[eh_, ew_, t_] := N[Abs[N[(N[Sin[N[ArcTan[N[(N[(N[(t * eh), $MachinePrecision] / ew), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\sin \tan^{-1} \left(\frac{t \cdot eh}{ew} \cdot -0.3333333333333333\right) \cdot eh\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites38.1%
Taylor expanded in t around inf
Applied rewrites23.0%
Taylor expanded in eh around 0
Applied rewrites23.0%
Final simplification23.0%
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (* (* (/ eh ew) -0.3333333333333333) t))) (fabs (* (/ t_1 (sqrt (+ (pow t_1 2.0) 1.0))) eh))))
double code(double eh, double ew, double t) {
double t_1 = ((eh / ew) * -0.3333333333333333) * t;
return fabs(((t_1 / sqrt((pow(t_1, 2.0) + 1.0))) * eh));
}
real(8) function code(eh, ew, t)
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = ((eh / ew) * (-0.3333333333333333d0)) * t
code = abs(((t_1 / sqrt(((t_1 ** 2.0d0) + 1.0d0))) * eh))
end function
public static double code(double eh, double ew, double t) {
double t_1 = ((eh / ew) * -0.3333333333333333) * t;
return Math.abs(((t_1 / Math.sqrt((Math.pow(t_1, 2.0) + 1.0))) * eh));
}
def code(eh, ew, t): t_1 = ((eh / ew) * -0.3333333333333333) * t return math.fabs(((t_1 / math.sqrt((math.pow(t_1, 2.0) + 1.0))) * eh))
function code(eh, ew, t) t_1 = Float64(Float64(Float64(eh / ew) * -0.3333333333333333) * t) return abs(Float64(Float64(t_1 / sqrt(Float64((t_1 ^ 2.0) + 1.0))) * eh)) end
function tmp = code(eh, ew, t) t_1 = ((eh / ew) * -0.3333333333333333) * t; tmp = abs(((t_1 / sqrt(((t_1 ^ 2.0) + 1.0))) * eh)); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(N[(eh / ew), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] * t), $MachinePrecision]}, N[Abs[N[(N[(t$95$1 / N[Sqrt[N[(N[Power[t$95$1, 2.0], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{eh}{ew} \cdot -0.3333333333333333\right) \cdot t\\
\left|\frac{t\_1}{\sqrt{{t\_1}^{2} + 1}} \cdot eh\right|
\end{array}
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6445.9
Applied rewrites45.9%
Taylor expanded in t around 0
Applied rewrites38.1%
Taylor expanded in t around inf
Applied rewrites23.0%
Applied rewrites10.7%
Final simplification10.7%
herbie shell --seed 2024313
(FPCore (eh ew t)
:name "Example from Robby"
:precision binary64
(fabs (+ (* (* ew (sin t)) (cos (atan (/ (/ eh ew) (tan t))))) (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t))))))))