
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((-eh * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((-eh * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
(FPCore (eh ew t) :precision binary64 (fabs (- (* (* (cos (atan (* (/ (tan t) ew) eh))) (cos t)) ew) (* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))
double code(double eh, double ew, double t) {
return fabs((((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew) - ((eh * sin(t)) * sin(atan(((-eh * tan(t)) / ew))))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew) - ((eh * sin(t)) * sin(atan(((-eh * tan(t)) / ew))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((((Math.cos(Math.atan(((Math.tan(t) / ew) * eh))) * Math.cos(t)) * ew) - ((eh * Math.sin(t)) * Math.sin(Math.atan(((-eh * Math.tan(t)) / ew))))));
}
def code(eh, ew, t): return math.fabs((((math.cos(math.atan(((math.tan(t) / ew) * eh))) * math.cos(t)) * ew) - ((eh * math.sin(t)) * math.sin(math.atan(((-eh * math.tan(t)) / ew))))))
function code(eh, ew, t) return abs(Float64(Float64(Float64(cos(atan(Float64(Float64(tan(t) / ew) * eh))) * cos(t)) * ew) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)))))) end
function tmp = code(eh, ew, t) tmp = abs((((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew) - ((eh * sin(t)) * sin(atan(((-eh * tan(t)) / ew)))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|
\end{array}
Initial program 99.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (tan t) ew))
(t_2 (* eh t_1))
(t_3 (asinh t_2))
(t_4 (atan (/ (* (- eh) (tan t)) ew)))
(t_5 (- (* (* ew (cos t)) (cos t_4)) (* (* eh (sin t)) (sin t_4))))
(t_6 (* (cos t) ew))
(t_7 (/ (fma t_2 (* (sin t) eh) t_6) (cosh (asinh (* t_1 eh))))))
(if (<= t_5 -2e-269)
(/ (fma (* t_2 eh) (sin t) t_6) (- (cosh t_3)))
(if (<= t_5 5e+82)
t_7
(if (<= t_5 5e+202)
(pow (sqrt (fma (* (tanh t_3) (sin t)) eh ew)) 2.0)
t_7)))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) / ew;
double t_2 = eh * t_1;
double t_3 = asinh(t_2);
double t_4 = atan(((-eh * tan(t)) / ew));
double t_5 = ((ew * cos(t)) * cos(t_4)) - ((eh * sin(t)) * sin(t_4));
double t_6 = cos(t) * ew;
double t_7 = fma(t_2, (sin(t) * eh), t_6) / cosh(asinh((t_1 * eh)));
double tmp;
if (t_5 <= -2e-269) {
tmp = fma((t_2 * eh), sin(t), t_6) / -cosh(t_3);
} else if (t_5 <= 5e+82) {
tmp = t_7;
} else if (t_5 <= 5e+202) {
tmp = pow(sqrt(fma((tanh(t_3) * sin(t)), eh, ew)), 2.0);
} else {
tmp = t_7;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(tan(t) / ew) t_2 = Float64(eh * t_1) t_3 = asinh(t_2) t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) t_5 = Float64(Float64(Float64(ew * cos(t)) * cos(t_4)) - Float64(Float64(eh * sin(t)) * sin(t_4))) t_6 = Float64(cos(t) * ew) t_7 = Float64(fma(t_2, Float64(sin(t) * eh), t_6) / cosh(asinh(Float64(t_1 * eh)))) tmp = 0.0 if (t_5 <= -2e-269) tmp = Float64(fma(Float64(t_2 * eh), sin(t), t_6) / Float64(-cosh(t_3))); elseif (t_5 <= 5e+82) tmp = t_7; elseif (t_5 <= 5e+202) tmp = sqrt(fma(Float64(tanh(t_3) * sin(t)), eh, ew)) ^ 2.0; else tmp = t_7; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[ArcSinh[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$7 = N[(N[(t$95$2 * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + t$95$6), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-269], N[(N[(N[(t$95$2 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision] + t$95$6), $MachinePrecision] / (-N[Cosh[t$95$3], $MachinePrecision])), $MachinePrecision], If[LessEqual[t$95$5, 5e+82], t$95$7, If[LessEqual[t$95$5, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[t$95$3], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := eh \cdot t\_1\\
t_3 := \sinh^{-1} t\_2\\
t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_5 := \left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4\\
t_6 := \cos t \cdot ew\\
t_7 := \frac{\mathsf{fma}\left(t\_2, \sin t \cdot eh, t\_6\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_2 \cdot eh, \sin t, t\_6\right)}{-\cosh t\_3}\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+82}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+202}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;t\_7\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269Initial program 99.8%
Applied rewrites1.2%
rem-square-sqrtN/A
sqrt-unprodN/A
sqr-negN/A
lift-neg.f64N/A
lift-neg.f64N/A
Applied rewrites80.1%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 5.00000000000000015e82 or 4.9999999999999999e202 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites70.1%
lift-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6483.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6483.2
Applied rewrites83.2%
if 5.00000000000000015e82 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 4.9999999999999999e202Initial program 99.8%
Applied rewrites63.5%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites77.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (tan t) ew))
(t_2 (* eh t_1))
(t_3 (* eh (sin t)))
(t_4 (* ew (cos t)))
(t_5 (atan (/ (* (- eh) (tan t)) ew)))
(t_6 (- (* t_4 (cos t_5)) (* t_3 (sin t_5))))
(t_7
(/
(fma t_2 (* (sin t) eh) (* (cos t) ew))
(cosh (asinh (* t_1 eh))))))
(if (<= t_6 -2e-269)
(fabs (/ t_4 (cos (atan (/ t_3 t_4)))))
(if (<= t_6 5e+82)
t_7
(if (<= t_6 5e+202)
(pow (sqrt (fma (* (tanh (asinh t_2)) (sin t)) eh ew)) 2.0)
t_7)))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) / ew;
double t_2 = eh * t_1;
double t_3 = eh * sin(t);
double t_4 = ew * cos(t);
double t_5 = atan(((-eh * tan(t)) / ew));
double t_6 = (t_4 * cos(t_5)) - (t_3 * sin(t_5));
double t_7 = fma(t_2, (sin(t) * eh), (cos(t) * ew)) / cosh(asinh((t_1 * eh)));
double tmp;
if (t_6 <= -2e-269) {
tmp = fabs((t_4 / cos(atan((t_3 / t_4)))));
} else if (t_6 <= 5e+82) {
tmp = t_7;
} else if (t_6 <= 5e+202) {
tmp = pow(sqrt(fma((tanh(asinh(t_2)) * sin(t)), eh, ew)), 2.0);
} else {
tmp = t_7;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(tan(t) / ew) t_2 = Float64(eh * t_1) t_3 = Float64(eh * sin(t)) t_4 = Float64(ew * cos(t)) t_5 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) t_6 = Float64(Float64(t_4 * cos(t_5)) - Float64(t_3 * sin(t_5))) t_7 = Float64(fma(t_2, Float64(sin(t) * eh), Float64(cos(t) * ew)) / cosh(asinh(Float64(t_1 * eh)))) tmp = 0.0 if (t_6 <= -2e-269) tmp = abs(Float64(t_4 / cos(atan(Float64(t_3 / t_4))))); elseif (t_6 <= 5e+82) tmp = t_7; elseif (t_6 <= 5e+202) tmp = sqrt(fma(Float64(tanh(asinh(t_2)) * sin(t)), eh, ew)) ^ 2.0; else tmp = t_7; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$4 * N[Cos[t$95$5], $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(t$95$2 * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -2e-269], N[Abs[N[(t$95$4 / N[Cos[N[ArcTan[N[(t$95$3 / t$95$4), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$6, 5e+82], t$95$7, If[LessEqual[t$95$6, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[t$95$2], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := eh \cdot t\_1\\
t_3 := eh \cdot \sin t\\
t_4 := ew \cdot \cos t\\
t_5 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_6 := t\_4 \cdot \cos t\_5 - t\_3 \cdot \sin t\_5\\
t_7 := \frac{\mathsf{fma}\left(t\_2, \sin t \cdot eh, \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\
\mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;\left|\frac{t\_4}{\cos \tan^{-1} \left(\frac{t\_3}{t\_4}\right)}\right|\\
\mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+82}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_2 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;t\_7\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269Initial program 99.8%
Applied rewrites99.8%
Applied rewrites99.8%
Taylor expanded in eh around 0
lower-/.f64N/A
lower-*.f64N/A
lift-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-cos.f6465.2
Applied rewrites65.2%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 5.00000000000000015e82 or 4.9999999999999999e202 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites70.1%
lift-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6483.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6483.2
Applied rewrites83.2%
if 5.00000000000000015e82 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 4.9999999999999999e202Initial program 99.8%
Applied rewrites63.5%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites77.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (tan t) ew))
(t_2 (* ew (cos t)))
(t_3 (atan (/ (* (- eh) (tan t)) ew)))
(t_4 (* eh (sin t)))
(t_5 (- (* t_2 (cos t_3)) (* t_4 (sin t_3))))
(t_6 (* eh t_1))
(t_7
(/
(fma (cos t) ew (* (* t_6 eh) (sin t)))
(cosh (asinh (* t_1 eh))))))
(if (<= t_5 -2e-269)
(fabs (/ t_2 (cos (atan (/ t_4 t_2)))))
(if (<= t_5 5e+82)
t_7
(if (<= t_5 5e+202)
(pow (sqrt (fma (* (tanh (asinh t_6)) (sin t)) eh ew)) 2.0)
t_7)))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) / ew;
double t_2 = ew * cos(t);
double t_3 = atan(((-eh * tan(t)) / ew));
double t_4 = eh * sin(t);
double t_5 = (t_2 * cos(t_3)) - (t_4 * sin(t_3));
double t_6 = eh * t_1;
double t_7 = fma(cos(t), ew, ((t_6 * eh) * sin(t))) / cosh(asinh((t_1 * eh)));
double tmp;
if (t_5 <= -2e-269) {
tmp = fabs((t_2 / cos(atan((t_4 / t_2)))));
} else if (t_5 <= 5e+82) {
tmp = t_7;
} else if (t_5 <= 5e+202) {
tmp = pow(sqrt(fma((tanh(asinh(t_6)) * sin(t)), eh, ew)), 2.0);
} else {
tmp = t_7;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(tan(t) / ew) t_2 = Float64(ew * cos(t)) t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) t_4 = Float64(eh * sin(t)) t_5 = Float64(Float64(t_2 * cos(t_3)) - Float64(t_4 * sin(t_3))) t_6 = Float64(eh * t_1) t_7 = Float64(fma(cos(t), ew, Float64(Float64(t_6 * eh) * sin(t))) / cosh(asinh(Float64(t_1 * eh)))) tmp = 0.0 if (t_5 <= -2e-269) tmp = abs(Float64(t_2 / cos(atan(Float64(t_4 / t_2))))); elseif (t_5 <= 5e+82) tmp = t_7; elseif (t_5 <= 5e+202) tmp = sqrt(fma(Float64(tanh(asinh(t_6)) * sin(t)), eh, ew)) ^ 2.0; else tmp = t_7; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$4 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(t$95$6 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-269], N[Abs[N[(t$95$2 / N[Cos[N[ArcTan[N[(t$95$4 / t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$5, 5e+82], t$95$7, If[LessEqual[t$95$5, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[t$95$6], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := ew \cdot \cos t\\
t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_4 := eh \cdot \sin t\\
t_5 := t\_2 \cdot \cos t\_3 - t\_4 \cdot \sin t\_3\\
t_6 := eh \cdot t\_1\\
t_7 := \frac{\mathsf{fma}\left(\cos t, ew, \left(t\_6 \cdot eh\right) \cdot \sin t\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;\left|\frac{t\_2}{\cos \tan^{-1} \left(\frac{t\_4}{t\_2}\right)}\right|\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+82}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+202}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_6 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;t\_7\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269Initial program 99.8%
Applied rewrites99.8%
Applied rewrites99.8%
Taylor expanded in eh around 0
lower-/.f64N/A
lower-*.f64N/A
lift-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-cos.f6465.2
Applied rewrites65.2%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 5.00000000000000015e82 or 4.9999999999999999e202 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites70.1%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6470.1
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6480.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6480.4
Applied rewrites80.4%
if 5.00000000000000015e82 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 4.9999999999999999e202Initial program 99.8%
Applied rewrites63.5%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites77.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (tan t) ew))
(t_2 (* eh (sin t)))
(t_3 (* eh t_1))
(t_4 (atan (/ (* (- eh) (tan t)) ew)))
(t_5 (* ew (cos t)))
(t_6 (- (* t_5 (cos t_4)) (* t_2 (sin t_4))))
(t_7 (fabs (/ t_5 (cos (atan (/ t_2 t_5)))))))
(if (<= t_6 -2e-269)
t_7
(if (<= t_6 2e+83)
(/
(fma (* t_1 eh) (* (sin t) eh) (* (cos t) ew))
(sqrt (+ 1.0 (pow t_3 2.0))))
(if (<= t_6 5e+202)
(pow (sqrt (fma (* (tanh (asinh t_3)) (sin t)) eh ew)) 2.0)
t_7)))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) / ew;
double t_2 = eh * sin(t);
double t_3 = eh * t_1;
double t_4 = atan(((-eh * tan(t)) / ew));
double t_5 = ew * cos(t);
double t_6 = (t_5 * cos(t_4)) - (t_2 * sin(t_4));
double t_7 = fabs((t_5 / cos(atan((t_2 / t_5)))));
double tmp;
if (t_6 <= -2e-269) {
tmp = t_7;
} else if (t_6 <= 2e+83) {
tmp = fma((t_1 * eh), (sin(t) * eh), (cos(t) * ew)) / sqrt((1.0 + pow(t_3, 2.0)));
} else if (t_6 <= 5e+202) {
tmp = pow(sqrt(fma((tanh(asinh(t_3)) * sin(t)), eh, ew)), 2.0);
} else {
tmp = t_7;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(tan(t) / ew) t_2 = Float64(eh * sin(t)) t_3 = Float64(eh * t_1) t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) t_5 = Float64(ew * cos(t)) t_6 = Float64(Float64(t_5 * cos(t_4)) - Float64(t_2 * sin(t_4))) t_7 = abs(Float64(t_5 / cos(atan(Float64(t_2 / t_5))))) tmp = 0.0 if (t_6 <= -2e-269) tmp = t_7; elseif (t_6 <= 2e+83) tmp = Float64(fma(Float64(t_1 * eh), Float64(sin(t) * eh), Float64(cos(t) * ew)) / sqrt(Float64(1.0 + (t_3 ^ 2.0)))); elseif (t_6 <= 5e+202) tmp = sqrt(fma(Float64(tanh(asinh(t_3)) * sin(t)), eh, ew)) ^ 2.0; else tmp = t_7; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[Abs[N[(t$95$5 / N[Cos[N[ArcTan[N[(t$95$2 / t$95$5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$6, -2e-269], t$95$7, If[LessEqual[t$95$6, 2e+83], N[(N[(N[(t$95$1 * eh), $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[t$95$3], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := eh \cdot \sin t\\
t_3 := eh \cdot t\_1\\
t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_5 := ew \cdot \cos t\\
t_6 := t\_5 \cdot \cos t\_4 - t\_2 \cdot \sin t\_4\\
t_7 := \left|\frac{t\_5}{\cos \tan^{-1} \left(\frac{t\_2}{t\_5}\right)}\right|\\
\mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+83}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_1 \cdot eh, \sin t \cdot eh, \cos t \cdot ew\right)}{\sqrt{1 + {t\_3}^{2}}}\\
\mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;t\_7\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269 or 4.9999999999999999e202 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites99.8%
Applied rewrites99.8%
Taylor expanded in eh around 0
lower-/.f64N/A
lower-*.f64N/A
lift-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-cos.f6465.1
Applied rewrites65.1%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 2.00000000000000006e83Initial program 99.8%
Applied rewrites79.7%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
lower-sqrt.f64N/A
lower-+.f64N/A
pow2N/A
lower-pow.f6473.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.5
Applied rewrites73.5%
lift-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-fma.f6482.6
lift-*.f64N/A
*-commutativeN/A
lift-*.f6482.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6482.6
Applied rewrites82.6%
if 2.00000000000000006e83 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 4.9999999999999999e202Initial program 99.8%
Applied rewrites63.3%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites77.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t)))
(t_2 (/ (tan t) ew))
(t_3 (* eh t_2))
(t_4 (atan (/ (* (- eh) (tan t)) ew)))
(t_5 (* ew (cos t)))
(t_6 (- (* t_5 (cos t_4)) (* t_1 (sin t_4))))
(t_7 (fabs (/ t_5 (cos (atan (/ t_1 t_5)))))))
(if (<= t_6 -2e-269)
t_7
(if (<= t_6 2e+83)
(/
(fma (cos t) ew (* (* (* t_2 eh) eh) (sin t)))
(sqrt (+ 1.0 (pow t_3 2.0))))
(if (<= t_6 5e+202)
(pow (sqrt (fma (* (tanh (asinh t_3)) (sin t)) eh ew)) 2.0)
t_7)))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double t_2 = tan(t) / ew;
double t_3 = eh * t_2;
double t_4 = atan(((-eh * tan(t)) / ew));
double t_5 = ew * cos(t);
double t_6 = (t_5 * cos(t_4)) - (t_1 * sin(t_4));
double t_7 = fabs((t_5 / cos(atan((t_1 / t_5)))));
double tmp;
if (t_6 <= -2e-269) {
tmp = t_7;
} else if (t_6 <= 2e+83) {
tmp = fma(cos(t), ew, (((t_2 * eh) * eh) * sin(t))) / sqrt((1.0 + pow(t_3, 2.0)));
} else if (t_6 <= 5e+202) {
tmp = pow(sqrt(fma((tanh(asinh(t_3)) * sin(t)), eh, ew)), 2.0);
} else {
tmp = t_7;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) t_2 = Float64(tan(t) / ew) t_3 = Float64(eh * t_2) t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) t_5 = Float64(ew * cos(t)) t_6 = Float64(Float64(t_5 * cos(t_4)) - Float64(t_1 * sin(t_4))) t_7 = abs(Float64(t_5 / cos(atan(Float64(t_1 / t_5))))) tmp = 0.0 if (t_6 <= -2e-269) tmp = t_7; elseif (t_6 <= 2e+83) tmp = Float64(fma(cos(t), ew, Float64(Float64(Float64(t_2 * eh) * eh) * sin(t))) / sqrt(Float64(1.0 + (t_3 ^ 2.0)))); elseif (t_6 <= 5e+202) tmp = sqrt(fma(Float64(tanh(asinh(t_3)) * sin(t)), eh, ew)) ^ 2.0; else tmp = t_7; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$3 = N[(eh * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[Abs[N[(t$95$5 / N[Cos[N[ArcTan[N[(t$95$1 / t$95$5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$6, -2e-269], t$95$7, If[LessEqual[t$95$6, 2e+83], N[(N[(N[Cos[t], $MachinePrecision] * ew + N[(N[(N[(t$95$2 * eh), $MachinePrecision] * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[t$95$3], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$7]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
t_2 := \frac{\tan t}{ew}\\
t_3 := eh \cdot t\_2\\
t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_5 := ew \cdot \cos t\\
t_6 := t\_5 \cdot \cos t\_4 - t\_1 \cdot \sin t\_4\\
t_7 := \left|\frac{t\_5}{\cos \tan^{-1} \left(\frac{t\_1}{t\_5}\right)}\right|\\
\mathbf{if}\;t\_6 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+83}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\cos t, ew, \left(\left(t\_2 \cdot eh\right) \cdot eh\right) \cdot \sin t\right)}{\sqrt{1 + {t\_3}^{2}}}\\
\mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+202}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} t\_3 \cdot \sin t, eh, ew\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;t\_7\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269 or 4.9999999999999999e202 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites99.8%
Applied rewrites99.8%
Taylor expanded in eh around 0
lower-/.f64N/A
lower-*.f64N/A
lift-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-cos.f6465.1
Applied rewrites65.1%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 2.00000000000000006e83Initial program 99.8%
Applied rewrites79.7%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
lower-sqrt.f64N/A
lower-+.f64N/A
pow2N/A
lower-pow.f6473.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.5
Applied rewrites73.5%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lower-*.f6481.0
lift-*.f64N/A
*-commutativeN/A
lift-*.f6481.0
Applied rewrites81.0%
if 2.00000000000000006e83 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 4.9999999999999999e202Initial program 99.8%
Applied rewrites63.3%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites77.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (tan t) ew))
(t_2 (* eh t_1))
(t_3 (cosh (asinh t_2)))
(t_4 (atan (/ (* (- eh) (tan t)) ew)))
(t_5 (- (* (* ew (cos t)) (cos t_4)) (* (* eh (sin t)) (sin t_4))))
(t_6 (* (cos t) ew)))
(if (<= t_5 -2e-269)
(/ (fma (* t_2 eh) (sin t) t_6) (- t_3))
(if (<= t_5 1e+25)
(/
(fma (* (* (- eh) (sin t)) t_1) (- eh) t_6)
(cosh (asinh (* t_1 eh))))
(pow
(sqrt (fma (* (tanh (/ (* eh t) ew)) (sin t)) eh (/ t_6 t_3)))
2.0)))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) / ew;
double t_2 = eh * t_1;
double t_3 = cosh(asinh(t_2));
double t_4 = atan(((-eh * tan(t)) / ew));
double t_5 = ((ew * cos(t)) * cos(t_4)) - ((eh * sin(t)) * sin(t_4));
double t_6 = cos(t) * ew;
double tmp;
if (t_5 <= -2e-269) {
tmp = fma((t_2 * eh), sin(t), t_6) / -t_3;
} else if (t_5 <= 1e+25) {
tmp = fma(((-eh * sin(t)) * t_1), -eh, t_6) / cosh(asinh((t_1 * eh)));
} else {
tmp = pow(sqrt(fma((tanh(((eh * t) / ew)) * sin(t)), eh, (t_6 / t_3))), 2.0);
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(tan(t) / ew) t_2 = Float64(eh * t_1) t_3 = cosh(asinh(t_2)) t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) t_5 = Float64(Float64(Float64(ew * cos(t)) * cos(t_4)) - Float64(Float64(eh * sin(t)) * sin(t_4))) t_6 = Float64(cos(t) * ew) tmp = 0.0 if (t_5 <= -2e-269) tmp = Float64(fma(Float64(t_2 * eh), sin(t), t_6) / Float64(-t_3)); elseif (t_5 <= 1e+25) tmp = Float64(fma(Float64(Float64(Float64(-eh) * sin(t)) * t_1), Float64(-eh), t_6) / cosh(asinh(Float64(t_1 * eh)))); else tmp = sqrt(fma(Float64(tanh(Float64(Float64(eh * t) / ew)) * sin(t)), eh, Float64(t_6 / t_3))) ^ 2.0; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Cosh[N[ArcSinh[t$95$2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-269], N[(N[(N[(t$95$2 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision] + t$95$6), $MachinePrecision] / (-t$95$3)), $MachinePrecision], If[LessEqual[t$95$5, 1e+25], N[(N[(N[(N[((-eh) * N[Sin[t], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * (-eh) + t$95$6), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[Sqrt[N[(N[(N[Tanh[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + N[(t$95$6 / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := eh \cdot t\_1\\
t_3 := \cosh \sinh^{-1} t\_2\\
t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_5 := \left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4\\
t_6 := \cos t \cdot ew\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_2 \cdot eh, \sin t, t\_6\right)}{-t\_3}\\
\mathbf{elif}\;t\_5 \leq 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(\left(-eh\right) \cdot \sin t\right) \cdot t\_1, -eh, t\_6\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \left(\frac{eh \cdot t}{ew}\right) \cdot \sin t, eh, \frac{t\_6}{t\_3}\right)}\right)}^{2}\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269Initial program 99.8%
Applied rewrites1.2%
rem-square-sqrtN/A
sqrt-unprodN/A
sqr-negN/A
lift-neg.f64N/A
lift-neg.f64N/A
Applied rewrites80.1%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 1.00000000000000009e25Initial program 99.8%
Applied rewrites82.7%
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
sqr-neg-revN/A
lift-neg.f64N/A
lift-neg.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6493.1
Applied rewrites93.1%
if 1.00000000000000009e25 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites59.7%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
Applied rewrites99.1%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f6484.7
Applied rewrites84.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t)))
(t_2 (atan (/ (* (- eh) (tan t)) ew)))
(t_3 (* ew (cos t)))
(t_4 (- (* t_3 (cos t_2)) (* t_1 (sin t_2))))
(t_5 (fabs (/ t_3 (cos (atan (/ t_1 t_3)))))))
(if (<= t_4 1e-175)
t_5
(if (<= t_4 5e+202)
(pow
(sqrt (fma (* (tanh (asinh (* eh (/ (tan t) ew)))) (sin t)) eh ew))
2.0)
t_5))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double t_2 = atan(((-eh * tan(t)) / ew));
double t_3 = ew * cos(t);
double t_4 = (t_3 * cos(t_2)) - (t_1 * sin(t_2));
double t_5 = fabs((t_3 / cos(atan((t_1 / t_3)))));
double tmp;
if (t_4 <= 1e-175) {
tmp = t_5;
} else if (t_4 <= 5e+202) {
tmp = pow(sqrt(fma((tanh(asinh((eh * (tan(t) / ew)))) * sin(t)), eh, ew)), 2.0);
} else {
tmp = t_5;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) t_2 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) t_3 = Float64(ew * cos(t)) t_4 = Float64(Float64(t_3 * cos(t_2)) - Float64(t_1 * sin(t_2))) t_5 = abs(Float64(t_3 / cos(atan(Float64(t_1 / t_3))))) tmp = 0.0 if (t_4 <= 1e-175) tmp = t_5; elseif (t_4 <= 5e+202) tmp = sqrt(fma(Float64(tanh(asinh(Float64(eh * Float64(tan(t) / ew)))) * sin(t)), eh, ew)) ^ 2.0; else tmp = t_5; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Abs[N[(t$95$3 / N[Cos[N[ArcTan[N[(t$95$1 / t$95$3), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 1e-175], t$95$5, If[LessEqual[t$95$4, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$5]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
t_2 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_3 := ew \cdot \cos t\\
t_4 := t\_3 \cdot \cos t\_2 - t\_1 \cdot \sin t\_2\\
t_5 := \left|\frac{t\_3}{\cos \tan^{-1} \left(\frac{t\_1}{t\_3}\right)}\right|\\
\mathbf{if}\;t\_4 \leq 10^{-175}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+202}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, ew\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 1e-175 or 4.9999999999999999e202 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites99.8%
Applied rewrites99.8%
Taylor expanded in eh around 0
lower-/.f64N/A
lower-*.f64N/A
lift-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-cos.f6465.9
Applied rewrites65.9%
if 1e-175 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 4.9999999999999999e202Initial program 99.8%
Applied rewrites74.7%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites78.0%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t)))
(t_2 (* ew (cos t)))
(t_3 (atan (/ (* (- eh) (tan t)) ew)))
(t_4 (- (* t_2 (cos t_3)) (* t_1 (sin t_3)))))
(if (<= t_4 5e-255)
(fabs (/ ew (cos (atan (/ t_1 t_2)))))
(if (<= t_4 5e+202)
(pow
(sqrt (fma (* (tanh (asinh (* eh (/ (tan t) ew)))) (sin t)) eh ew))
2.0)
t_2))))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double t_2 = ew * cos(t);
double t_3 = atan(((-eh * tan(t)) / ew));
double t_4 = (t_2 * cos(t_3)) - (t_1 * sin(t_3));
double tmp;
if (t_4 <= 5e-255) {
tmp = fabs((ew / cos(atan((t_1 / t_2)))));
} else if (t_4 <= 5e+202) {
tmp = pow(sqrt(fma((tanh(asinh((eh * (tan(t) / ew)))) * sin(t)), eh, ew)), 2.0);
} else {
tmp = t_2;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) t_2 = Float64(ew * cos(t)) t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) t_4 = Float64(Float64(t_2 * cos(t_3)) - Float64(t_1 * sin(t_3))) tmp = 0.0 if (t_4 <= 5e-255) tmp = abs(Float64(ew / cos(atan(Float64(t_1 / t_2))))); elseif (t_4 <= 5e+202) tmp = sqrt(fma(Float64(tanh(asinh(Float64(eh * Float64(tan(t) / ew)))) * sin(t)), eh, ew)) ^ 2.0; else tmp = t_2; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 5e-255], N[Abs[N[(ew / N[Cos[N[ArcTan[N[(t$95$1 / t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 5e+202], N[Power[N[Sqrt[N[(N[(N[Tanh[N[ArcSinh[N[(eh * N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[t], $MachinePrecision]), $MachinePrecision] * eh + ew), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
t_2 := ew \cdot \cos t\\
t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
t_4 := t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3\\
\mathbf{if}\;t\_4 \leq 5 \cdot 10^{-255}:\\
\;\;\;\;\left|\frac{ew}{\cos \tan^{-1} \left(\frac{t\_1}{t\_2}\right)}\right|\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+202}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(\tanh \sinh^{-1} \left(eh \cdot \frac{\tan t}{ew}\right) \cdot \sin t, eh, ew\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 4.9999999999999996e-255Initial program 99.8%
Applied rewrites99.8%
Applied rewrites99.8%
Taylor expanded in t around 0
lower-/.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-cos.f6445.0
Applied rewrites45.0%
if 4.9999999999999996e-255 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < 4.9999999999999999e202Initial program 99.8%
Applied rewrites75.1%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites78.1%
if 4.9999999999999999e202 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites50.7%
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
Applied rewrites66.8%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-undivN/A
lift-/.f64N/A
lower-sqrt.f6466.8
lift-*.f64N/A
*-commutativeN/A
lift-*.f6466.8
Applied rewrites66.8%
Taylor expanded in eh around 0
lower-*.f64N/A
lift-cos.f6463.8
Applied rewrites63.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (tan t) ew))
(t_2 (atan (* t_1 eh)))
(t_3 (* eh t_1))
(t_4 (atan (/ (* (- eh) (tan t)) ew))))
(if (<=
(- (* (* ew (cos t)) (cos t_4)) (* (* eh (sin t)) (sin t_4)))
-2e-269)
(/ (fma (* t_3 eh) (sin t) (* (cos t) ew)) (- (cosh (asinh t_3))))
(fma (* (cos t_2) (cos t)) ew (* (sin t_2) (* (sin t) eh))))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) / ew;
double t_2 = atan((t_1 * eh));
double t_3 = eh * t_1;
double t_4 = atan(((-eh * tan(t)) / ew));
double tmp;
if ((((ew * cos(t)) * cos(t_4)) - ((eh * sin(t)) * sin(t_4))) <= -2e-269) {
tmp = fma((t_3 * eh), sin(t), (cos(t) * ew)) / -cosh(asinh(t_3));
} else {
tmp = fma((cos(t_2) * cos(t)), ew, (sin(t_2) * (sin(t) * eh)));
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(tan(t) / ew) t_2 = atan(Float64(t_1 * eh)) t_3 = Float64(eh * t_1) t_4 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) tmp = 0.0 if (Float64(Float64(Float64(ew * cos(t)) * cos(t_4)) - Float64(Float64(eh * sin(t)) * sin(t_4))) <= -2e-269) tmp = Float64(fma(Float64(t_3 * eh), sin(t), Float64(cos(t) * ew)) / Float64(-cosh(asinh(t_3)))); else tmp = fma(Float64(cos(t_2) * cos(t)), ew, Float64(sin(t_2) * Float64(sin(t) * eh))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(eh * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-269], N[(N[(N[(t$95$3 * eh), $MachinePrecision] * N[Sin[t], $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / (-N[Cosh[N[ArcSinh[t$95$3], $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[(N[Cos[t$95$2], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew + N[(N[Sin[t$95$2], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := \tan^{-1} \left(t\_1 \cdot eh\right)\\
t_3 := eh \cdot t\_1\\
t_4 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_4 - \left(eh \cdot \sin t\right) \cdot \sin t\_4 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_3 \cdot eh, \sin t, \cos t \cdot ew\right)}{-\cosh \sinh^{-1} t\_3}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\cos t\_2 \cdot \cos t, ew, \sin t\_2 \cdot \left(\sin t \cdot eh\right)\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269Initial program 99.8%
Applied rewrites1.2%
rem-square-sqrtN/A
sqrt-unprodN/A
sqr-negN/A
lift-neg.f64N/A
lift-neg.f64N/A
Applied rewrites80.1%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites98.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t)))
(t_2 (* ew (cos t)))
(t_3 (atan (/ (* (- eh) (tan t)) ew))))
(if (<= (- (* t_2 (cos t_3)) (* t_1 (sin t_3))) -2e-269)
(fabs (/ ew (cos (atan (/ t_1 t_2)))))
t_2)))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double t_2 = ew * cos(t);
double t_3 = atan(((-eh * tan(t)) / ew));
double tmp;
if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -2e-269) {
tmp = fabs((ew / cos(atan((t_1 / t_2)))));
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = eh * sin(t)
t_2 = ew * cos(t)
t_3 = atan(((-eh * tan(t)) / ew))
if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= (-2d-269)) then
tmp = abs((ew / cos(atan((t_1 / t_2)))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double t_2 = ew * Math.cos(t);
double t_3 = Math.atan(((-eh * Math.tan(t)) / ew));
double tmp;
if (((t_2 * Math.cos(t_3)) - (t_1 * Math.sin(t_3))) <= -2e-269) {
tmp = Math.abs((ew / Math.cos(Math.atan((t_1 / t_2)))));
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) t_2 = ew * math.cos(t) t_3 = math.atan(((-eh * math.tan(t)) / ew)) tmp = 0 if ((t_2 * math.cos(t_3)) - (t_1 * math.sin(t_3))) <= -2e-269: tmp = math.fabs((ew / math.cos(math.atan((t_1 / t_2))))) else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) t_2 = Float64(ew * cos(t)) t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) tmp = 0.0 if (Float64(Float64(t_2 * cos(t_3)) - Float64(t_1 * sin(t_3))) <= -2e-269) tmp = abs(Float64(ew / cos(atan(Float64(t_1 / t_2))))); else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); t_2 = ew * cos(t); t_3 = atan(((-eh * tan(t)) / ew)); tmp = 0.0; if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -2e-269) tmp = abs((ew / cos(atan((t_1 / t_2))))); else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-269], N[Abs[N[(ew / N[Cos[N[ArcTan[N[(t$95$1 / t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
t_2 := ew \cdot \cos t\\
t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;\left|\frac{ew}{\cos \tan^{-1} \left(\frac{t\_1}{t\_2}\right)}\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269Initial program 99.8%
Applied rewrites99.8%
Applied rewrites99.8%
Taylor expanded in t around 0
lower-/.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-cos.f6444.2
Applied rewrites44.2%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites68.1%
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
Applied rewrites78.0%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-undivN/A
lift-/.f64N/A
lower-sqrt.f6478.0
lift-*.f64N/A
*-commutativeN/A
lift-*.f6478.0
Applied rewrites78.0%
Taylor expanded in eh around 0
lower-*.f64N/A
lift-cos.f6460.8
Applied rewrites60.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t)))
(t_2 (* ew (cos t)))
(t_3 (atan (/ (* (- eh) (tan t)) ew))))
(if (<= (- (* t_2 (cos t_3)) (* t_1 (sin t_3))) -1e-226) (* -1.0 t_1) t_2)))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double t_2 = ew * cos(t);
double t_3 = atan(((-eh * tan(t)) / ew));
double tmp;
if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -1e-226) {
tmp = -1.0 * t_1;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = eh * sin(t)
t_2 = ew * cos(t)
t_3 = atan(((-eh * tan(t)) / ew))
if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= (-1d-226)) then
tmp = (-1.0d0) * t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double t_2 = ew * Math.cos(t);
double t_3 = Math.atan(((-eh * Math.tan(t)) / ew));
double tmp;
if (((t_2 * Math.cos(t_3)) - (t_1 * Math.sin(t_3))) <= -1e-226) {
tmp = -1.0 * t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) t_2 = ew * math.cos(t) t_3 = math.atan(((-eh * math.tan(t)) / ew)) tmp = 0 if ((t_2 * math.cos(t_3)) - (t_1 * math.sin(t_3))) <= -1e-226: tmp = -1.0 * t_1 else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) t_2 = Float64(ew * cos(t)) t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) tmp = 0.0 if (Float64(Float64(t_2 * cos(t_3)) - Float64(t_1 * sin(t_3))) <= -1e-226) tmp = Float64(-1.0 * t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); t_2 = ew * cos(t); t_3 = atan(((-eh * tan(t)) / ew)); tmp = 0.0; if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -1e-226) tmp = -1.0 * t_1; else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-226], N[(-1.0 * t$95$1), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
t_2 := ew \cdot \cos t\\
t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -1 \cdot 10^{-226}:\\
\;\;\;\;-1 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -9.99999999999999921e-227Initial program 99.8%
Applied rewrites1.1%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
lower-sqrt.f64N/A
lower-+.f64N/A
pow2N/A
lower-pow.f641.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.1
Applied rewrites1.1%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lower-*.f641.1
lift-*.f64N/A
*-commutativeN/A
lift-*.f641.1
Applied rewrites1.1%
Taylor expanded in eh around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-sin.f6420.5
Applied rewrites20.5%
if -9.99999999999999921e-227 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites66.1%
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
Applied rewrites75.8%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-undivN/A
lift-/.f64N/A
lower-sqrt.f6475.8
lift-*.f64N/A
*-commutativeN/A
lift-*.f6475.8
Applied rewrites75.8%
Taylor expanded in eh around 0
lower-*.f64N/A
lift-cos.f6459.3
Applied rewrites59.3%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (sin t)))
(t_2 (* ew (cos t)))
(t_3 (atan (/ (* (- eh) (tan t)) ew))))
(if (<= (- (* t_2 (cos t_3)) (* t_1 (sin t_3))) -2e-269) t_1 t_2)))
double code(double eh, double ew, double t) {
double t_1 = eh * sin(t);
double t_2 = ew * cos(t);
double t_3 = atan(((-eh * tan(t)) / ew));
double tmp;
if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -2e-269) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = eh * sin(t)
t_2 = ew * cos(t)
t_3 = atan(((-eh * tan(t)) / ew))
if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= (-2d-269)) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.sin(t);
double t_2 = ew * Math.cos(t);
double t_3 = Math.atan(((-eh * Math.tan(t)) / ew));
double tmp;
if (((t_2 * Math.cos(t_3)) - (t_1 * Math.sin(t_3))) <= -2e-269) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.sin(t) t_2 = ew * math.cos(t) t_3 = math.atan(((-eh * math.tan(t)) / ew)) tmp = 0 if ((t_2 * math.cos(t_3)) - (t_1 * math.sin(t_3))) <= -2e-269: tmp = t_1 else: tmp = t_2 return tmp
function code(eh, ew, t) t_1 = Float64(eh * sin(t)) t_2 = Float64(ew * cos(t)) t_3 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) tmp = 0.0 if (Float64(Float64(t_2 * cos(t_3)) - Float64(t_1 * sin(t_3))) <= -2e-269) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * sin(t); t_2 = ew * cos(t); t_3 = atan(((-eh * tan(t)) / ew)); tmp = 0.0; if (((t_2 * cos(t_3)) - (t_1 * sin(t_3))) <= -2e-269) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-269], t$95$1, t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \sin t\\
t_2 := ew \cdot \cos t\\
t_3 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\mathbf{if}\;t\_2 \cdot \cos t\_3 - t\_1 \cdot \sin t\_3 \leq -2 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -1.9999999999999999e-269Initial program 99.8%
Applied rewrites1.2%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
lower-sqrt.f64N/A
lower-+.f64N/A
pow2N/A
lower-pow.f641.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.2
Applied rewrites1.2%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lower-*.f641.2
lift-*.f64N/A
*-commutativeN/A
lift-*.f641.2
Applied rewrites1.2%
Taylor expanded in eh around inf
lower-*.f64N/A
lift-sin.f6421.4
Applied rewrites21.4%
if -1.9999999999999999e-269 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites68.1%
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
Applied rewrites78.0%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-undivN/A
lift-/.f64N/A
lower-sqrt.f6478.0
lift-*.f64N/A
*-commutativeN/A
lift-*.f6478.0
Applied rewrites78.0%
Taylor expanded in eh around 0
lower-*.f64N/A
lift-cos.f6460.8
Applied rewrites60.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (/ (tan t) ew)) (t_2 (* -1.0 (* eh (sin t)))))
(if (<= eh -2.8e+147)
t_2
(if (<= eh 2.75e+144)
(fabs
(/
(fma (sin t) (* t_1 (* eh eh)) (* (cos t) ew))
(cosh (asinh (* t_1 eh)))))
t_2))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) / ew;
double t_2 = -1.0 * (eh * sin(t));
double tmp;
if (eh <= -2.8e+147) {
tmp = t_2;
} else if (eh <= 2.75e+144) {
tmp = fabs((fma(sin(t), (t_1 * (eh * eh)), (cos(t) * ew)) / cosh(asinh((t_1 * eh)))));
} else {
tmp = t_2;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(tan(t) / ew) t_2 = Float64(-1.0 * Float64(eh * sin(t))) tmp = 0.0 if (eh <= -2.8e+147) tmp = t_2; elseif (eh <= 2.75e+144) tmp = abs(Float64(fma(sin(t), Float64(t_1 * Float64(eh * eh)), Float64(cos(t) * ew)) / cosh(asinh(Float64(t_1 * eh))))); else tmp = t_2; end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 * N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eh, -2.8e+147], t$95$2, If[LessEqual[eh, 2.75e+144], N[Abs[N[(N[(N[Sin[t], $MachinePrecision] * N[(t$95$1 * N[(eh * eh), $MachinePrecision]), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$1 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := -1 \cdot \left(eh \cdot \sin t\right)\\
\mathbf{if}\;eh \leq -2.8 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;eh \leq 2.75 \cdot 10^{+144}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(\sin t, t\_1 \cdot \left(eh \cdot eh\right), \cos t \cdot ew\right)}{\cosh \sinh^{-1} \left(t\_1 \cdot eh\right)}\right|\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if eh < -2.8000000000000001e147 or 2.75000000000000011e144 < eh Initial program 99.8%
Applied rewrites3.2%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
lower-sqrt.f64N/A
lower-+.f64N/A
pow2N/A
lower-pow.f642.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f642.5
Applied rewrites2.5%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lower-*.f6419.8
lift-*.f64N/A
*-commutativeN/A
lift-*.f6419.8
Applied rewrites19.8%
Taylor expanded in eh around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-sin.f6437.3
Applied rewrites37.3%
if -2.8000000000000001e147 < eh < 2.75000000000000011e144Initial program 99.8%
Applied rewrites91.2%
(FPCore (eh ew t) :precision binary64 (if (<= ew 3.7e-163) (* eh (sin t)) ew))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= 3.7e-163) {
tmp = eh * sin(t);
} else {
tmp = ew;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if (ew <= 3.7d-163) then
tmp = eh * sin(t)
else
tmp = ew
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if (ew <= 3.7e-163) {
tmp = eh * Math.sin(t);
} else {
tmp = ew;
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if ew <= 3.7e-163: tmp = eh * math.sin(t) else: tmp = ew return tmp
function code(eh, ew, t) tmp = 0.0 if (ew <= 3.7e-163) tmp = Float64(eh * sin(t)); else tmp = ew; end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if (ew <= 3.7e-163) tmp = eh * sin(t); else tmp = ew; end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[LessEqual[ew, 3.7e-163], N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision], ew]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq 3.7 \cdot 10^{-163}:\\
\;\;\;\;eh \cdot \sin t\\
\mathbf{else}:\\
\;\;\;\;ew\\
\end{array}
\end{array}
if ew < 3.6999999999999999e-163Initial program 99.8%
Applied rewrites22.2%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
lower-sqrt.f64N/A
lower-+.f64N/A
pow2N/A
lower-pow.f6419.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.6
Applied rewrites19.6%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lower-*.f6422.5
lift-*.f64N/A
*-commutativeN/A
lift-*.f6422.5
Applied rewrites22.5%
Taylor expanded in eh around inf
lower-*.f64N/A
lift-sin.f6425.4
Applied rewrites25.4%
if 3.6999999999999999e-163 < ew Initial program 99.8%
Applied rewrites56.9%
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
Applied rewrites65.9%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-undivN/A
lift-/.f64N/A
lower-sqrt.f6465.9
lift-*.f64N/A
*-commutativeN/A
lift-*.f6465.9
Applied rewrites65.9%
Taylor expanded in t around 0
Applied rewrites49.6%
(FPCore (eh ew t) :precision binary64 ew)
double code(double eh, double ew, double t) {
return ew;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = ew
end function
public static double code(double eh, double ew, double t) {
return ew;
}
def code(eh, ew, t): return ew
function code(eh, ew, t) return ew end
function tmp = code(eh, ew, t) tmp = ew; end
code[eh_, ew_, t_] := ew
\begin{array}{l}
\\
ew
\end{array}
Initial program 99.8%
Applied rewrites34.7%
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
Applied rewrites39.8%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-undivN/A
lift-/.f64N/A
lower-sqrt.f6439.8
lift-*.f64N/A
*-commutativeN/A
lift-*.f6439.8
Applied rewrites39.8%
Taylor expanded in t around 0
Applied rewrites22.1%
herbie shell --seed 2025106
(FPCore (eh ew t)
:name "Example 2 from Robby"
:precision binary64
(fabs (- (* (* ew (cos t)) (cos (atan (/ (* (- eh) (tan t)) ew)))) (* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))