
(FPCore (kx ky th) :precision binary64 (* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))
double code(double kx, double ky, double th) {
return (sin(ky) / sqrt((pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))) * sin(th);
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
code = (sin(ky) / sqrt(((sin(kx) ** 2.0d0) + (sin(ky) ** 2.0d0)))) * sin(th)
end function
public static double code(double kx, double ky, double th) {
return (Math.sin(ky) / Math.sqrt((Math.pow(Math.sin(kx), 2.0) + Math.pow(Math.sin(ky), 2.0)))) * Math.sin(th);
}
def code(kx, ky, th): return (math.sin(ky) / math.sqrt((math.pow(math.sin(kx), 2.0) + math.pow(math.sin(ky), 2.0)))) * math.sin(th)
function code(kx, ky, th) return Float64(Float64(sin(ky) / sqrt(Float64((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th)) end
function tmp = code(kx, ky, th) tmp = (sin(ky) / sqrt(((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th); end
code[kx_, ky_, th_] := N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[(N[Power[N[Sin[kx], $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[Sin[ky], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin ky}{\sqrt{{\sin kx}^{2} + {\sin ky}^{2}}} \cdot \sin th
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (kx ky th) :precision binary64 (* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))
double code(double kx, double ky, double th) {
return (sin(ky) / sqrt((pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))) * sin(th);
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
code = (sin(ky) / sqrt(((sin(kx) ** 2.0d0) + (sin(ky) ** 2.0d0)))) * sin(th)
end function
public static double code(double kx, double ky, double th) {
return (Math.sin(ky) / Math.sqrt((Math.pow(Math.sin(kx), 2.0) + Math.pow(Math.sin(ky), 2.0)))) * Math.sin(th);
}
def code(kx, ky, th): return (math.sin(ky) / math.sqrt((math.pow(math.sin(kx), 2.0) + math.pow(math.sin(ky), 2.0)))) * math.sin(th)
function code(kx, ky, th) return Float64(Float64(sin(ky) / sqrt(Float64((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th)) end
function tmp = code(kx, ky, th) tmp = (sin(ky) / sqrt(((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th); end
code[kx_, ky_, th_] := N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[(N[Power[N[Sin[kx], $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[Sin[ky], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin ky}{\sqrt{{\sin kx}^{2} + {\sin ky}^{2}}} \cdot \sin th
\end{array}
(FPCore (kx ky th) :precision binary64 (* (/ (sin ky) (hypot (sin ky) (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
return (sin(ky) / hypot(sin(ky), sin(kx))) * sin(th);
}
public static double code(double kx, double ky, double th) {
return (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx))) * Math.sin(th);
}
def code(kx, ky, th): return (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) * math.sin(th)
function code(kx, ky, th) return Float64(Float64(sin(ky) / hypot(sin(ky), sin(kx))) * sin(th)) end
function tmp = code(kx, ky, th) tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * sin(th); end
code[kx_, ky_, th_] := N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \sin th
\end{array}
Initial program 95.8%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
(FPCore (kx ky th)
:precision binary64
(let* ((t_1
(*
ky
(+
1.0
(*
(* ky ky)
(+ -0.16666666666666666 (* 0.008333333333333333 (* ky ky))))))))
(if (<= (sin ky) -0.02)
(* th (/ (sin ky) (hypot (sin ky) kx)))
(if (<= (sin ky) 0.012)
(* (sin th) (/ t_1 (hypot t_1 (sin kx))))
(sin th)))))
double code(double kx, double ky, double th) {
double t_1 = ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))));
double tmp;
if (sin(ky) <= -0.02) {
tmp = th * (sin(ky) / hypot(sin(ky), kx));
} else if (sin(ky) <= 0.012) {
tmp = sin(th) * (t_1 / hypot(t_1, sin(kx)));
} else {
tmp = sin(th);
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double t_1 = ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))));
double tmp;
if (Math.sin(ky) <= -0.02) {
tmp = th * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
} else if (Math.sin(ky) <= 0.012) {
tmp = Math.sin(th) * (t_1 / Math.hypot(t_1, Math.sin(kx)));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): t_1 = ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky))))) tmp = 0 if math.sin(ky) <= -0.02: tmp = th * (math.sin(ky) / math.hypot(math.sin(ky), kx)) elif math.sin(ky) <= 0.012: tmp = math.sin(th) * (t_1 / math.hypot(t_1, math.sin(kx))) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) t_1 = Float64(ky * Float64(1.0 + Float64(Float64(ky * ky) * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(ky * ky)))))) tmp = 0.0 if (sin(ky) <= -0.02) tmp = Float64(th * Float64(sin(ky) / hypot(sin(ky), kx))); elseif (sin(ky) <= 0.012) tmp = Float64(sin(th) * Float64(t_1 / hypot(t_1, sin(kx)))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) t_1 = ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky))))); tmp = 0.0; if (sin(ky) <= -0.02) tmp = th * (sin(ky) / hypot(sin(ky), kx)); elseif (sin(ky) <= 0.012) tmp = sin(th) * (t_1 / hypot(t_1, sin(kx))); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := Block[{t$95$1 = N[(ky * N[(1.0 + N[(N[(ky * ky), $MachinePrecision] * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(ky * ky), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Sin[ky], $MachinePrecision], -0.02], N[(th * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 0.012], N[(N[Sin[th], $MachinePrecision] * N[(t$95$1 / N[Sqrt[t$95$1 ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ky \cdot \left(1 + \left(ky \cdot ky\right) \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(ky \cdot ky\right)\right)\right)\\
\mathbf{if}\;\sin ky \leq -0.02:\\
\;\;\;\;th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\mathbf{elif}\;\sin ky \leq 0.012:\\
\;\;\;\;\sin th \cdot \frac{t\_1}{\mathsf{hypot}\left(t\_1, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -0.0200000000000000004Initial program 99.7%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in kx around 0
Simplified51.0%
Taylor expanded in th around 0
Simplified27.1%
if -0.0200000000000000004 < (sin.f64 ky) < 0.012Initial program 92.0%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in ky around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.6%
Simplified99.6%
Taylor expanded in ky around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.6%
Simplified99.6%
if 0.012 < (sin.f64 ky) Initial program 99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6462.5%
Simplified62.5%
Final simplification71.5%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin ky) -0.02)
(* th (/ (sin ky) (hypot (sin ky) kx)))
(if (<= (sin ky) 0.012)
(*
(sin th)
(/
(*
ky
(+
1.0
(*
(* ky ky)
(+ -0.16666666666666666 (* 0.008333333333333333 (* ky ky))))))
(hypot (* ky (+ 1.0 (* -0.16666666666666666 (* ky ky)))) (sin kx))))
(sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= -0.02) {
tmp = th * (sin(ky) / hypot(sin(ky), kx));
} else if (sin(ky) <= 0.012) {
tmp = sin(th) * ((ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))))) / hypot((ky * (1.0 + (-0.16666666666666666 * (ky * ky)))), sin(kx)));
} else {
tmp = sin(th);
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(ky) <= -0.02) {
tmp = th * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
} else if (Math.sin(ky) <= 0.012) {
tmp = Math.sin(th) * ((ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))))) / Math.hypot((ky * (1.0 + (-0.16666666666666666 * (ky * ky)))), Math.sin(kx)));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= -0.02: tmp = th * (math.sin(ky) / math.hypot(math.sin(ky), kx)) elif math.sin(ky) <= 0.012: tmp = math.sin(th) * ((ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))))) / math.hypot((ky * (1.0 + (-0.16666666666666666 * (ky * ky)))), math.sin(kx))) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= -0.02) tmp = Float64(th * Float64(sin(ky) / hypot(sin(ky), kx))); elseif (sin(ky) <= 0.012) tmp = Float64(sin(th) * Float64(Float64(ky * Float64(1.0 + Float64(Float64(ky * ky) * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(ky * ky)))))) / hypot(Float64(ky * Float64(1.0 + Float64(-0.16666666666666666 * Float64(ky * ky)))), sin(kx)))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= -0.02) tmp = th * (sin(ky) / hypot(sin(ky), kx)); elseif (sin(ky) <= 0.012) tmp = sin(th) * ((ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))))) / hypot((ky * (1.0 + (-0.16666666666666666 * (ky * ky)))), sin(kx))); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], -0.02], N[(th * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 0.012], N[(N[Sin[th], $MachinePrecision] * N[(N[(ky * N[(1.0 + N[(N[(ky * ky), $MachinePrecision] * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(ky * ky), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(ky * N[(1.0 + N[(-0.16666666666666666 * N[(ky * ky), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq -0.02:\\
\;\;\;\;th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\mathbf{elif}\;\sin ky \leq 0.012:\\
\;\;\;\;\sin th \cdot \frac{ky \cdot \left(1 + \left(ky \cdot ky\right) \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(ky \cdot ky\right)\right)\right)}{\mathsf{hypot}\left(ky \cdot \left(1 + -0.16666666666666666 \cdot \left(ky \cdot ky\right)\right), \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -0.0200000000000000004Initial program 99.7%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in kx around 0
Simplified51.0%
Taylor expanded in th around 0
Simplified27.1%
if -0.0200000000000000004 < (sin.f64 ky) < 0.012Initial program 92.0%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in ky around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.6%
Simplified99.6%
Taylor expanded in ky around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.4%
Simplified99.4%
if 0.012 < (sin.f64 ky) Initial program 99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6462.5%
Simplified62.5%
Final simplification71.4%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin ky) -0.02)
(* th (/ (sin ky) (hypot (sin ky) kx)))
(if (<= (sin ky) 0.012)
(*
(sin th)
(/
(*
ky
(+
1.0
(*
(* ky ky)
(+ -0.16666666666666666 (* 0.008333333333333333 (* ky ky))))))
(hypot ky (sin kx))))
(sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= -0.02) {
tmp = th * (sin(ky) / hypot(sin(ky), kx));
} else if (sin(ky) <= 0.012) {
tmp = sin(th) * ((ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))))) / hypot(ky, sin(kx)));
} else {
tmp = sin(th);
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(ky) <= -0.02) {
tmp = th * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
} else if (Math.sin(ky) <= 0.012) {
tmp = Math.sin(th) * ((ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))))) / Math.hypot(ky, Math.sin(kx)));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= -0.02: tmp = th * (math.sin(ky) / math.hypot(math.sin(ky), kx)) elif math.sin(ky) <= 0.012: tmp = math.sin(th) * ((ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))))) / math.hypot(ky, math.sin(kx))) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= -0.02) tmp = Float64(th * Float64(sin(ky) / hypot(sin(ky), kx))); elseif (sin(ky) <= 0.012) tmp = Float64(sin(th) * Float64(Float64(ky * Float64(1.0 + Float64(Float64(ky * ky) * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(ky * ky)))))) / hypot(ky, sin(kx)))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= -0.02) tmp = th * (sin(ky) / hypot(sin(ky), kx)); elseif (sin(ky) <= 0.012) tmp = sin(th) * ((ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))))) / hypot(ky, sin(kx))); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], -0.02], N[(th * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 0.012], N[(N[Sin[th], $MachinePrecision] * N[(N[(ky * N[(1.0 + N[(N[(ky * ky), $MachinePrecision] * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(ky * ky), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq -0.02:\\
\;\;\;\;th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\mathbf{elif}\;\sin ky \leq 0.012:\\
\;\;\;\;\sin th \cdot \frac{ky \cdot \left(1 + \left(ky \cdot ky\right) \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(ky \cdot ky\right)\right)\right)}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -0.0200000000000000004Initial program 99.7%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in kx around 0
Simplified51.0%
Taylor expanded in th around 0
Simplified27.1%
if -0.0200000000000000004 < (sin.f64 ky) < 0.012Initial program 92.0%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in ky around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.6%
Simplified99.6%
Taylor expanded in ky around 0
Simplified98.9%
if 0.012 < (sin.f64 ky) Initial program 99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6462.5%
Simplified62.5%
Final simplification71.2%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.65)
(*
(sin ky)
(/
(*
th
(+
1.0
(*
th
(*
th
(+
-0.16666666666666666
(*
(* th th)
(+ 0.008333333333333333 (* (* th th) -0.0001984126984126984))))))))
(hypot (sin kx) (sin ky))))
(if (<= th 7.4e+155)
(* (sin ky) (/ (sin th) (hypot (sin kx) ky)))
(* (sin th) (/ (sin ky) (hypot (sin ky) kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.65) {
tmp = sin(ky) * ((th * (1.0 + (th * (th * (-0.16666666666666666 + ((th * th) * (0.008333333333333333 + ((th * th) * -0.0001984126984126984)))))))) / hypot(sin(kx), sin(ky)));
} else if (th <= 7.4e+155) {
tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky));
} else {
tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.65) {
tmp = Math.sin(ky) * ((th * (1.0 + (th * (th * (-0.16666666666666666 + ((th * th) * (0.008333333333333333 + ((th * th) * -0.0001984126984126984)))))))) / Math.hypot(Math.sin(kx), Math.sin(ky)));
} else if (th <= 7.4e+155) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(kx), ky));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.65: tmp = math.sin(ky) * ((th * (1.0 + (th * (th * (-0.16666666666666666 + ((th * th) * (0.008333333333333333 + ((th * th) * -0.0001984126984126984)))))))) / math.hypot(math.sin(kx), math.sin(ky))) elif th <= 7.4e+155: tmp = math.sin(ky) * (math.sin(th) / math.hypot(math.sin(kx), ky)) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.65) tmp = Float64(sin(ky) * Float64(Float64(th * Float64(1.0 + Float64(th * Float64(th * Float64(-0.16666666666666666 + Float64(Float64(th * th) * Float64(0.008333333333333333 + Float64(Float64(th * th) * -0.0001984126984126984)))))))) / hypot(sin(kx), sin(ky)))); elseif (th <= 7.4e+155) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(sin(kx), ky))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.65) tmp = sin(ky) * ((th * (1.0 + (th * (th * (-0.16666666666666666 + ((th * th) * (0.008333333333333333 + ((th * th) * -0.0001984126984126984)))))))) / hypot(sin(kx), sin(ky))); elseif (th <= 7.4e+155) tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky)); else tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.65], N[(N[Sin[ky], $MachinePrecision] * N[(N[(th * N[(1.0 + N[(th * N[(th * N[(-0.16666666666666666 + N[(N[(th * th), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(th * th), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 7.4e+155], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.65:\\
\;\;\;\;\sin ky \cdot \frac{th \cdot \left(1 + th \cdot \left(th \cdot \left(-0.16666666666666666 + \left(th \cdot th\right) \cdot \left(0.008333333333333333 + \left(th \cdot th\right) \cdot -0.0001984126984126984\right)\right)\right)\right)}{\mathsf{hypot}\left(\sin kx, \sin ky\right)}\\
\mathbf{elif}\;th \leq 7.4 \cdot 10^{+155}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin kx, ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\end{array}
\end{array}
if th < 0.650000000000000022Initial program 97.5%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
if 0.650000000000000022 < th < 7.3999999999999996e155Initial program 88.6%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified61.9%
if 7.3999999999999996e155 < th Initial program 93.3%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified53.7%
Final simplification66.3%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.58)
(/
(*
th
(+
1.0
(*
(* th th)
(+ -0.16666666666666666 (* (* th th) 0.008333333333333333)))))
(/ (hypot (sin ky) (sin kx)) (sin ky)))
(if (<= th 7e+155)
(* (sin ky) (/ (sin th) (hypot (sin kx) ky)))
(* (sin th) (/ (sin ky) (hypot (sin ky) kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.58) {
tmp = (th * (1.0 + ((th * th) * (-0.16666666666666666 + ((th * th) * 0.008333333333333333))))) / (hypot(sin(ky), sin(kx)) / sin(ky));
} else if (th <= 7e+155) {
tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky));
} else {
tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.58) {
tmp = (th * (1.0 + ((th * th) * (-0.16666666666666666 + ((th * th) * 0.008333333333333333))))) / (Math.hypot(Math.sin(ky), Math.sin(kx)) / Math.sin(ky));
} else if (th <= 7e+155) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(kx), ky));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.58: tmp = (th * (1.0 + ((th * th) * (-0.16666666666666666 + ((th * th) * 0.008333333333333333))))) / (math.hypot(math.sin(ky), math.sin(kx)) / math.sin(ky)) elif th <= 7e+155: tmp = math.sin(ky) * (math.sin(th) / math.hypot(math.sin(kx), ky)) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.58) tmp = Float64(Float64(th * Float64(1.0 + Float64(Float64(th * th) * Float64(-0.16666666666666666 + Float64(Float64(th * th) * 0.008333333333333333))))) / Float64(hypot(sin(ky), sin(kx)) / sin(ky))); elseif (th <= 7e+155) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(sin(kx), ky))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.58) tmp = (th * (1.0 + ((th * th) * (-0.16666666666666666 + ((th * th) * 0.008333333333333333))))) / (hypot(sin(ky), sin(kx)) / sin(ky)); elseif (th <= 7e+155) tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky)); else tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.58], N[(N[(th * N[(1.0 + N[(N[(th * th), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(th * th), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 7e+155], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.58:\\
\;\;\;\;\frac{th \cdot \left(1 + \left(th \cdot th\right) \cdot \left(-0.16666666666666666 + \left(th \cdot th\right) \cdot 0.008333333333333333\right)\right)}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}\\
\mathbf{elif}\;th \leq 7 \cdot 10^{+155}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin kx, ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\end{array}
\end{array}
if th < 0.57999999999999996Initial program 97.5%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.1%
Simplified69.1%
if 0.57999999999999996 < th < 6.99999999999999969e155Initial program 88.6%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified61.9%
if 6.99999999999999969e155 < th Initial program 93.3%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified53.7%
Final simplification66.2%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.7)
(*
(sin ky)
(/
(*
th
(+
1.0
(*
th
(* th (+ -0.16666666666666666 (* (* th th) 0.008333333333333333))))))
(hypot (sin kx) (sin ky))))
(if (<= th 7.8e+155)
(* (sin ky) (/ (sin th) (hypot (sin kx) ky)))
(* (sin th) (/ (sin ky) (hypot (sin ky) kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.7) {
tmp = sin(ky) * ((th * (1.0 + (th * (th * (-0.16666666666666666 + ((th * th) * 0.008333333333333333)))))) / hypot(sin(kx), sin(ky)));
} else if (th <= 7.8e+155) {
tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky));
} else {
tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.7) {
tmp = Math.sin(ky) * ((th * (1.0 + (th * (th * (-0.16666666666666666 + ((th * th) * 0.008333333333333333)))))) / Math.hypot(Math.sin(kx), Math.sin(ky)));
} else if (th <= 7.8e+155) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(kx), ky));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.7: tmp = math.sin(ky) * ((th * (1.0 + (th * (th * (-0.16666666666666666 + ((th * th) * 0.008333333333333333)))))) / math.hypot(math.sin(kx), math.sin(ky))) elif th <= 7.8e+155: tmp = math.sin(ky) * (math.sin(th) / math.hypot(math.sin(kx), ky)) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.7) tmp = Float64(sin(ky) * Float64(Float64(th * Float64(1.0 + Float64(th * Float64(th * Float64(-0.16666666666666666 + Float64(Float64(th * th) * 0.008333333333333333)))))) / hypot(sin(kx), sin(ky)))); elseif (th <= 7.8e+155) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(sin(kx), ky))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.7) tmp = sin(ky) * ((th * (1.0 + (th * (th * (-0.16666666666666666 + ((th * th) * 0.008333333333333333)))))) / hypot(sin(kx), sin(ky))); elseif (th <= 7.8e+155) tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky)); else tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.7], N[(N[Sin[ky], $MachinePrecision] * N[(N[(th * N[(1.0 + N[(th * N[(th * N[(-0.16666666666666666 + N[(N[(th * th), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 7.8e+155], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.7:\\
\;\;\;\;\sin ky \cdot \frac{th \cdot \left(1 + th \cdot \left(th \cdot \left(-0.16666666666666666 + \left(th \cdot th\right) \cdot 0.008333333333333333\right)\right)\right)}{\mathsf{hypot}\left(\sin kx, \sin ky\right)}\\
\mathbf{elif}\;th \leq 7.8 \cdot 10^{+155}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin kx, ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\end{array}
\end{array}
if th < 0.69999999999999996Initial program 97.5%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.0%
Simplified69.0%
if 0.69999999999999996 < th < 7.7999999999999996e155Initial program 88.6%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified61.9%
if 7.7999999999999996e155 < th Initial program 93.3%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified53.7%
Final simplification66.2%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.6)
(/
(* th (+ 1.0 (* -0.16666666666666666 (* th th))))
(/ (hypot (sin ky) (sin kx)) (sin ky)))
(if (<= th 5.4e+155)
(* (sin ky) (/ (sin th) (hypot (sin kx) ky)))
(* (sin th) (/ (sin ky) (hypot (sin ky) kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.6) {
tmp = (th * (1.0 + (-0.16666666666666666 * (th * th)))) / (hypot(sin(ky), sin(kx)) / sin(ky));
} else if (th <= 5.4e+155) {
tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky));
} else {
tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.6) {
tmp = (th * (1.0 + (-0.16666666666666666 * (th * th)))) / (Math.hypot(Math.sin(ky), Math.sin(kx)) / Math.sin(ky));
} else if (th <= 5.4e+155) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(kx), ky));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.6: tmp = (th * (1.0 + (-0.16666666666666666 * (th * th)))) / (math.hypot(math.sin(ky), math.sin(kx)) / math.sin(ky)) elif th <= 5.4e+155: tmp = math.sin(ky) * (math.sin(th) / math.hypot(math.sin(kx), ky)) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.6) tmp = Float64(Float64(th * Float64(1.0 + Float64(-0.16666666666666666 * Float64(th * th)))) / Float64(hypot(sin(ky), sin(kx)) / sin(ky))); elseif (th <= 5.4e+155) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(sin(kx), ky))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.6) tmp = (th * (1.0 + (-0.16666666666666666 * (th * th)))) / (hypot(sin(ky), sin(kx)) / sin(ky)); elseif (th <= 5.4e+155) tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky)); else tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.6], N[(N[(th * N[(1.0 + N[(-0.16666666666666666 * N[(th * th), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 5.4e+155], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.6:\\
\;\;\;\;\frac{th \cdot \left(1 + -0.16666666666666666 \cdot \left(th \cdot th\right)\right)}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}\\
\mathbf{elif}\;th \leq 5.4 \cdot 10^{+155}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin kx, ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\end{array}
\end{array}
if th < 0.599999999999999978Initial program 97.5%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
if 0.599999999999999978 < th < 5.39999999999999987e155Initial program 88.6%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified61.9%
if 5.39999999999999987e155 < th Initial program 93.3%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified53.7%
Final simplification66.3%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.58)
(*
(sin ky)
(/
(* th (+ 1.0 (* -0.16666666666666666 (* th th))))
(hypot (sin kx) (sin ky))))
(if (<= th 8.6e+155)
(* (sin ky) (/ (sin th) (hypot (sin kx) ky)))
(* (sin th) (/ (sin ky) (hypot (sin ky) kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.58) {
tmp = sin(ky) * ((th * (1.0 + (-0.16666666666666666 * (th * th)))) / hypot(sin(kx), sin(ky)));
} else if (th <= 8.6e+155) {
tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky));
} else {
tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.58) {
tmp = Math.sin(ky) * ((th * (1.0 + (-0.16666666666666666 * (th * th)))) / Math.hypot(Math.sin(kx), Math.sin(ky)));
} else if (th <= 8.6e+155) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(kx), ky));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.58: tmp = math.sin(ky) * ((th * (1.0 + (-0.16666666666666666 * (th * th)))) / math.hypot(math.sin(kx), math.sin(ky))) elif th <= 8.6e+155: tmp = math.sin(ky) * (math.sin(th) / math.hypot(math.sin(kx), ky)) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.58) tmp = Float64(sin(ky) * Float64(Float64(th * Float64(1.0 + Float64(-0.16666666666666666 * Float64(th * th)))) / hypot(sin(kx), sin(ky)))); elseif (th <= 8.6e+155) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(sin(kx), ky))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.58) tmp = sin(ky) * ((th * (1.0 + (-0.16666666666666666 * (th * th)))) / hypot(sin(kx), sin(ky))); elseif (th <= 8.6e+155) tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky)); else tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.58], N[(N[Sin[ky], $MachinePrecision] * N[(N[(th * N[(1.0 + N[(-0.16666666666666666 * N[(th * th), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 8.6e+155], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.58:\\
\;\;\;\;\sin ky \cdot \frac{th \cdot \left(1 + -0.16666666666666666 \cdot \left(th \cdot th\right)\right)}{\mathsf{hypot}\left(\sin kx, \sin ky\right)}\\
\mathbf{elif}\;th \leq 8.6 \cdot 10^{+155}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin kx, ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\end{array}
\end{array}
if th < 0.57999999999999996Initial program 97.5%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
if 0.57999999999999996 < th < 8.6000000000000005e155Initial program 88.6%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified61.9%
if 8.6000000000000005e155 < th Initial program 93.3%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified53.7%
Final simplification66.3%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.00034)
(* (/ (sin ky) (hypot (sin ky) (sin kx))) th)
(if (<= th 6.8e+155)
(* (sin ky) (/ (sin th) (hypot (sin kx) ky)))
(* (sin th) (/ (sin ky) (hypot (sin ky) kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.00034) {
tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * th;
} else if (th <= 6.8e+155) {
tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky));
} else {
tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.00034) {
tmp = (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx))) * th;
} else if (th <= 6.8e+155) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(kx), ky));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.00034: tmp = (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) * th elif th <= 6.8e+155: tmp = math.sin(ky) * (math.sin(th) / math.hypot(math.sin(kx), ky)) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.00034) tmp = Float64(Float64(sin(ky) / hypot(sin(ky), sin(kx))) * th); elseif (th <= 6.8e+155) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(sin(kx), ky))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.00034) tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * th; elseif (th <= 6.8e+155) tmp = sin(ky) * (sin(th) / hypot(sin(kx), ky)); else tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.00034], N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * th), $MachinePrecision], If[LessEqual[th, 6.8e+155], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.00034:\\
\;\;\;\;\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot th\\
\mathbf{elif}\;th \leq 6.8 \cdot 10^{+155}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin kx, ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\end{array}
\end{array}
if th < 3.4e-4Initial program 97.5%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
Simplified69.1%
if 3.4e-4 < th < 6.8000000000000002e155Initial program 88.9%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0
Simplified63.0%
if 6.8000000000000002e155 < th Initial program 93.3%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified53.7%
Final simplification66.4%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.00046)
(* (/ (sin ky) (hypot (sin ky) (sin kx))) th)
(if (<= th 7.5e+155)
(* (sin th) (/ (sin ky) (hypot ky (sin kx))))
(* (sin th) (/ (sin ky) (hypot (sin ky) kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.00046) {
tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * th;
} else if (th <= 7.5e+155) {
tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx)));
} else {
tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.00046) {
tmp = (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx))) * th;
} else if (th <= 7.5e+155) {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(ky, Math.sin(kx)));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.00046: tmp = (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) * th elif th <= 7.5e+155: tmp = math.sin(th) * (math.sin(ky) / math.hypot(ky, math.sin(kx))) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.00046) tmp = Float64(Float64(sin(ky) / hypot(sin(ky), sin(kx))) * th); elseif (th <= 7.5e+155) tmp = Float64(sin(th) * Float64(sin(ky) / hypot(ky, sin(kx)))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.00046) tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * th; elseif (th <= 7.5e+155) tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx))); else tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.00046], N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * th), $MachinePrecision], If[LessEqual[th, 7.5e+155], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.00046:\\
\;\;\;\;\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot th\\
\mathbf{elif}\;th \leq 7.5 \cdot 10^{+155}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\end{array}
\end{array}
if th < 4.6000000000000001e-4Initial program 97.5%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
Simplified69.1%
if 4.6000000000000001e-4 < th < 7.4999999999999999e155Initial program 88.9%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0
Simplified63.0%
if 7.4999999999999999e155 < th Initial program 93.3%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified53.7%
Final simplification66.4%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.00018)
(* (sin ky) (/ th (hypot (sin kx) (sin ky))))
(if (<= th 6.2e+155)
(* (sin th) (/ (sin ky) (hypot ky (sin kx))))
(* (sin th) (/ (sin ky) (hypot (sin ky) kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.00018) {
tmp = sin(ky) * (th / hypot(sin(kx), sin(ky)));
} else if (th <= 6.2e+155) {
tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx)));
} else {
tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.00018) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(kx), Math.sin(ky)));
} else if (th <= 6.2e+155) {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(ky, Math.sin(kx)));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.00018: tmp = math.sin(ky) * (th / math.hypot(math.sin(kx), math.sin(ky))) elif th <= 6.2e+155: tmp = math.sin(th) * (math.sin(ky) / math.hypot(ky, math.sin(kx))) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.00018) tmp = Float64(sin(ky) * Float64(th / hypot(sin(kx), sin(ky)))); elseif (th <= 6.2e+155) tmp = Float64(sin(th) * Float64(sin(ky) / hypot(ky, sin(kx)))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.00018) tmp = sin(ky) * (th / hypot(sin(kx), sin(ky))); elseif (th <= 6.2e+155) tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx))); else tmp = sin(th) * (sin(ky) / hypot(sin(ky), kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.00018], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 6.2e+155], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.00018:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin kx, \sin ky\right)}\\
\mathbf{elif}\;th \leq 6.2 \cdot 10^{+155}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\end{array}
\end{array}
if th < 1.80000000000000011e-4Initial program 97.5%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in th around 0
Simplified69.0%
if 1.80000000000000011e-4 < th < 6.19999999999999978e155Initial program 88.9%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0
Simplified63.0%
if 6.19999999999999978e155 < th Initial program 93.3%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified53.7%
Final simplification66.3%
(FPCore (kx ky th) :precision binary64 (if (<= (sin kx) 1e-7) (* (sin th) (/ ky (hypot ky kx))) (* (/ 1.0 (sin kx)) (* (sin ky) (sin th)))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= 1e-7) {
tmp = sin(th) * (ky / hypot(ky, kx));
} else {
tmp = (1.0 / sin(kx)) * (sin(ky) * sin(th));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= 1e-7) {
tmp = Math.sin(th) * (ky / Math.hypot(ky, kx));
} else {
tmp = (1.0 / Math.sin(kx)) * (Math.sin(ky) * Math.sin(th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(kx) <= 1e-7: tmp = math.sin(th) * (ky / math.hypot(ky, kx)) else: tmp = (1.0 / math.sin(kx)) * (math.sin(ky) * math.sin(th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(kx) <= 1e-7) tmp = Float64(sin(th) * Float64(ky / hypot(ky, kx))); else tmp = Float64(Float64(1.0 / sin(kx)) * Float64(sin(ky) * sin(th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(kx) <= 1e-7) tmp = sin(th) * (ky / hypot(ky, kx)); else tmp = (1.0 / sin(kx)) * (sin(ky) * sin(th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], 1e-7], N[(N[Sin[th], $MachinePrecision] * N[(ky / N[Sqrt[ky ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[kx], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin kx \leq 10^{-7}:\\
\;\;\;\;\sin th \cdot \frac{ky}{\mathsf{hypot}\left(ky, kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin kx} \cdot \left(\sin ky \cdot \sin th\right)\\
\end{array}
\end{array}
if (sin.f64 kx) < 9.9999999999999995e-8Initial program 94.2%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in kx around 0
Simplified74.6%
Taylor expanded in ky around 0
Simplified41.0%
Taylor expanded in ky around 0
Simplified57.6%
if 9.9999999999999995e-8 < (sin.f64 kx) Initial program 99.5%
clear-numN/A
associate-/r/N/A
associate-*l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in ky around 0
sin-lowering-sin.f6463.7%
Simplified63.7%
Final simplification59.5%
(FPCore (kx ky th)
:precision binary64
(let* ((t_1
(*
ky
(+
1.0
(*
(* ky ky)
(+ -0.16666666666666666 (* 0.008333333333333333 (* ky ky))))))))
(if (<= ky 2.15e+21)
(* (sin th) (/ t_1 (hypot t_1 (sin kx))))
(* (sin ky) (/ th (hypot (sin kx) (sin ky)))))))
double code(double kx, double ky, double th) {
double t_1 = ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))));
double tmp;
if (ky <= 2.15e+21) {
tmp = sin(th) * (t_1 / hypot(t_1, sin(kx)));
} else {
tmp = sin(ky) * (th / hypot(sin(kx), sin(ky)));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double t_1 = ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky)))));
double tmp;
if (ky <= 2.15e+21) {
tmp = Math.sin(th) * (t_1 / Math.hypot(t_1, Math.sin(kx)));
} else {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(kx), Math.sin(ky)));
}
return tmp;
}
def code(kx, ky, th): t_1 = ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky))))) tmp = 0 if ky <= 2.15e+21: tmp = math.sin(th) * (t_1 / math.hypot(t_1, math.sin(kx))) else: tmp = math.sin(ky) * (th / math.hypot(math.sin(kx), math.sin(ky))) return tmp
function code(kx, ky, th) t_1 = Float64(ky * Float64(1.0 + Float64(Float64(ky * ky) * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(ky * ky)))))) tmp = 0.0 if (ky <= 2.15e+21) tmp = Float64(sin(th) * Float64(t_1 / hypot(t_1, sin(kx)))); else tmp = Float64(sin(ky) * Float64(th / hypot(sin(kx), sin(ky)))); end return tmp end
function tmp_2 = code(kx, ky, th) t_1 = ky * (1.0 + ((ky * ky) * (-0.16666666666666666 + (0.008333333333333333 * (ky * ky))))); tmp = 0.0; if (ky <= 2.15e+21) tmp = sin(th) * (t_1 / hypot(t_1, sin(kx))); else tmp = sin(ky) * (th / hypot(sin(kx), sin(ky))); end tmp_2 = tmp; end
code[kx_, ky_, th_] := Block[{t$95$1 = N[(ky * N[(1.0 + N[(N[(ky * ky), $MachinePrecision] * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(ky * ky), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[ky, 2.15e+21], N[(N[Sin[th], $MachinePrecision] * N[(t$95$1 / N[Sqrt[t$95$1 ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ky \cdot \left(1 + \left(ky \cdot ky\right) \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(ky \cdot ky\right)\right)\right)\\
\mathbf{if}\;ky \leq 2.15 \cdot 10^{+21}:\\
\;\;\;\;\sin th \cdot \frac{t\_1}{\mathsf{hypot}\left(t\_1, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin kx, \sin ky\right)}\\
\end{array}
\end{array}
if ky < 2.15e21Initial program 94.5%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.5%
Simplified67.5%
Taylor expanded in ky around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
if 2.15e21 < ky Initial program 99.7%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
Simplified61.0%
Final simplification67.2%
(FPCore (kx ky th) :precision binary64 (if (<= (sin kx) 1e-7) (* (sin th) (/ ky (hypot ky kx))) (* (sin th) (/ (sin ky) (sin kx)))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= 1e-7) {
tmp = sin(th) * (ky / hypot(ky, kx));
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= 1e-7) {
tmp = Math.sin(th) * (ky / Math.hypot(ky, kx));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.sin(kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(kx) <= 1e-7: tmp = math.sin(th) * (ky / math.hypot(ky, kx)) else: tmp = math.sin(th) * (math.sin(ky) / math.sin(kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(kx) <= 1e-7) tmp = Float64(sin(th) * Float64(ky / hypot(ky, kx))); else tmp = Float64(sin(th) * Float64(sin(ky) / sin(kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(kx) <= 1e-7) tmp = sin(th) * (ky / hypot(ky, kx)); else tmp = sin(th) * (sin(ky) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], 1e-7], N[(N[Sin[th], $MachinePrecision] * N[(ky / N[Sqrt[ky ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin kx \leq 10^{-7}:\\
\;\;\;\;\sin th \cdot \frac{ky}{\mathsf{hypot}\left(ky, kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < 9.9999999999999995e-8Initial program 94.2%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in kx around 0
Simplified74.6%
Taylor expanded in ky around 0
Simplified41.0%
Taylor expanded in ky around 0
Simplified57.6%
if 9.9999999999999995e-8 < (sin.f64 kx) Initial program 99.5%
Taylor expanded in ky around 0
sin-lowering-sin.f6463.7%
Simplified63.7%
Final simplification59.4%
(FPCore (kx ky th) :precision binary64 (if (<= (sin kx) 1e-7) (* (sin th) (/ ky (hypot ky kx))) (* (sin th) (/ ky (sin kx)))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= 1e-7) {
tmp = sin(th) * (ky / hypot(ky, kx));
} else {
tmp = sin(th) * (ky / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= 1e-7) {
tmp = Math.sin(th) * (ky / Math.hypot(ky, kx));
} else {
tmp = Math.sin(th) * (ky / Math.sin(kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(kx) <= 1e-7: tmp = math.sin(th) * (ky / math.hypot(ky, kx)) else: tmp = math.sin(th) * (ky / math.sin(kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(kx) <= 1e-7) tmp = Float64(sin(th) * Float64(ky / hypot(ky, kx))); else tmp = Float64(sin(th) * Float64(ky / sin(kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(kx) <= 1e-7) tmp = sin(th) * (ky / hypot(ky, kx)); else tmp = sin(th) * (ky / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], 1e-7], N[(N[Sin[th], $MachinePrecision] * N[(ky / N[Sqrt[ky ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(ky / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin kx \leq 10^{-7}:\\
\;\;\;\;\sin th \cdot \frac{ky}{\mathsf{hypot}\left(ky, kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < 9.9999999999999995e-8Initial program 94.2%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in kx around 0
Simplified74.6%
Taylor expanded in ky around 0
Simplified41.0%
Taylor expanded in ky around 0
Simplified57.6%
if 9.9999999999999995e-8 < (sin.f64 kx) Initial program 99.5%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6456.3%
Simplified56.3%
Final simplification57.2%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) 5e-138) (* (sin ky) (/ (sin th) kx)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= 5e-138) {
tmp = sin(ky) * (sin(th) / kx);
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (sin(ky) <= 5d-138) then
tmp = sin(ky) * (sin(th) / kx)
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(ky) <= 5e-138) {
tmp = Math.sin(ky) * (Math.sin(th) / kx);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= 5e-138: tmp = math.sin(ky) * (math.sin(th) / kx) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= 5e-138) tmp = Float64(sin(ky) * Float64(sin(th) / kx)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= 5e-138) tmp = sin(ky) * (sin(th) / kx); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], 5e-138], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / kx), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq 5 \cdot 10^{-138}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < 4.99999999999999989e-138Initial program 93.7%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in kx around 0
Simplified57.4%
Taylor expanded in kx around inf
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6419.7%
Simplified19.7%
if 4.99999999999999989e-138 < (sin.f64 ky) Initial program 99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6456.9%
Simplified56.9%
(FPCore (kx ky th) :precision binary64 (if (<= ky 1.15e-54) (/ (sin th) (/ (sin kx) ky)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1.15e-54) {
tmp = sin(th) / (sin(kx) / ky);
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (ky <= 1.15d-54) then
tmp = sin(th) / (sin(kx) / ky)
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1.15e-54) {
tmp = Math.sin(th) / (Math.sin(kx) / ky);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 1.15e-54: tmp = math.sin(th) / (math.sin(kx) / ky) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 1.15e-54) tmp = Float64(sin(th) / Float64(sin(kx) / ky)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 1.15e-54) tmp = sin(th) / (sin(kx) / ky); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 1.15e-54], N[(N[Sin[th], $MachinePrecision] / N[(N[Sin[kx], $MachinePrecision] / ky), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 1.15 \cdot 10^{-54}:\\
\;\;\;\;\frac{\sin th}{\frac{\sin kx}{ky}}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 1.1499999999999999e-54Initial program 94.0%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6435.7%
Simplified35.7%
if 1.1499999999999999e-54 < ky Initial program 99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6434.1%
Simplified34.1%
(FPCore (kx ky th) :precision binary64 (if (<= ky 1.25e-54) (* (sin th) (/ ky (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1.25e-54) {
tmp = sin(th) * (ky / sin(kx));
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (ky <= 1.25d-54) then
tmp = sin(th) * (ky / sin(kx))
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1.25e-54) {
tmp = Math.sin(th) * (ky / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 1.25e-54: tmp = math.sin(th) * (ky / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 1.25e-54) tmp = Float64(sin(th) * Float64(ky / sin(kx))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 1.25e-54) tmp = sin(th) * (ky / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 1.25e-54], N[(N[Sin[th], $MachinePrecision] * N[(ky / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 1.25 \cdot 10^{-54}:\\
\;\;\;\;\sin th \cdot \frac{ky}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 1.25000000000000004e-54Initial program 94.0%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6435.7%
Simplified35.7%
if 1.25000000000000004e-54 < ky Initial program 99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6434.1%
Simplified34.1%
Final simplification35.2%
(FPCore (kx ky th) :precision binary64 (if (<= ky 2.6e-137) (* (sin th) (/ ky kx)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.6e-137) {
tmp = sin(th) * (ky / kx);
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (ky <= 2.6d-137) then
tmp = sin(th) * (ky / kx)
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.6e-137) {
tmp = Math.sin(th) * (ky / kx);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 2.6e-137: tmp = math.sin(th) * (ky / kx) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 2.6e-137) tmp = Float64(sin(th) * Float64(ky / kx)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 2.6e-137) tmp = sin(th) * (ky / kx); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 2.6e-137], N[(N[Sin[th], $MachinePrecision] * N[(ky / kx), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 2.6 \cdot 10^{-137}:\\
\;\;\;\;\sin th \cdot \frac{ky}{kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 2.6e-137Initial program 93.2%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in kx around 0
Simplified57.5%
Taylor expanded in ky around 0
/-lowering-/.f6420.4%
Simplified20.4%
if 2.6e-137 < ky Initial program 99.8%
Taylor expanded in kx around 0
sin-lowering-sin.f6435.8%
Simplified35.8%
Final simplification26.4%
(FPCore (kx ky th) :precision binary64 (if (<= ky 3.05e-137) (* ky (/ (sin th) kx)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 3.05e-137) {
tmp = ky * (sin(th) / kx);
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (ky <= 3.05d-137) then
tmp = ky * (sin(th) / kx)
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 3.05e-137) {
tmp = ky * (Math.sin(th) / kx);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 3.05e-137: tmp = ky * (math.sin(th) / kx) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 3.05e-137) tmp = Float64(ky * Float64(sin(th) / kx)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 3.05e-137) tmp = ky * (sin(th) / kx); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 3.05e-137], N[(ky * N[(N[Sin[th], $MachinePrecision] / kx), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 3.05 \cdot 10^{-137}:\\
\;\;\;\;ky \cdot \frac{\sin th}{kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 3.05000000000000003e-137Initial program 93.2%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in kx around 0
Simplified57.5%
Taylor expanded in ky around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6420.4%
Simplified20.4%
if 3.05000000000000003e-137 < ky Initial program 99.8%
Taylor expanded in kx around 0
sin-lowering-sin.f6435.8%
Simplified35.8%
(FPCore (kx ky th) :precision binary64 (if (<= kx 1.1e+22) (sin th) (* -0.16666666666666666 (* th (* th th)))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 1.1e+22) {
tmp = sin(th);
} else {
tmp = -0.16666666666666666 * (th * (th * th));
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (kx <= 1.1d+22) then
tmp = sin(th)
else
tmp = (-0.16666666666666666d0) * (th * (th * th))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 1.1e+22) {
tmp = Math.sin(th);
} else {
tmp = -0.16666666666666666 * (th * (th * th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 1.1e+22: tmp = math.sin(th) else: tmp = -0.16666666666666666 * (th * (th * th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 1.1e+22) tmp = sin(th); else tmp = Float64(-0.16666666666666666 * Float64(th * Float64(th * th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 1.1e+22) tmp = sin(th); else tmp = -0.16666666666666666 * (th * (th * th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 1.1e+22], N[Sin[th], $MachinePrecision], N[(-0.16666666666666666 * N[(th * N[(th * th), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 1.1 \cdot 10^{+22}:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(th \cdot \left(th \cdot th\right)\right)\\
\end{array}
\end{array}
if kx < 1.1e22Initial program 94.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6429.4%
Simplified29.4%
if 1.1e22 < kx Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f646.7%
Simplified6.7%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f645.1%
Simplified5.1%
Taylor expanded in th around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.7%
Simplified16.7%
(FPCore (kx ky th) :precision binary64 (if (<= kx 7.6e+21) th (* -0.16666666666666666 (* th (* th th)))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 7.6e+21) {
tmp = th;
} else {
tmp = -0.16666666666666666 * (th * (th * th));
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (kx <= 7.6d+21) then
tmp = th
else
tmp = (-0.16666666666666666d0) * (th * (th * th))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 7.6e+21) {
tmp = th;
} else {
tmp = -0.16666666666666666 * (th * (th * th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 7.6e+21: tmp = th else: tmp = -0.16666666666666666 * (th * (th * th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 7.6e+21) tmp = th; else tmp = Float64(-0.16666666666666666 * Float64(th * Float64(th * th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 7.6e+21) tmp = th; else tmp = -0.16666666666666666 * (th * (th * th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 7.6e+21], th, N[(-0.16666666666666666 * N[(th * N[(th * th), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 7.6 \cdot 10^{+21}:\\
\;\;\;\;th\\
\mathbf{else}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(th \cdot \left(th \cdot th\right)\right)\\
\end{array}
\end{array}
if kx < 7.6e21Initial program 94.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6429.4%
Simplified29.4%
Taylor expanded in th around 0
Simplified18.9%
if 7.6e21 < kx Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f646.7%
Simplified6.7%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f645.1%
Simplified5.1%
Taylor expanded in th around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.7%
Simplified16.7%
(FPCore (kx ky th) :precision binary64 th)
double code(double kx, double ky, double th) {
return th;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
code = th
end function
public static double code(double kx, double ky, double th) {
return th;
}
def code(kx, ky, th): return th
function code(kx, ky, th) return th end
function tmp = code(kx, ky, th) tmp = th; end
code[kx_, ky_, th_] := th
\begin{array}{l}
\\
th
\end{array}
Initial program 95.8%
Taylor expanded in kx around 0
sin-lowering-sin.f6424.1%
Simplified24.1%
Taylor expanded in th around 0
Simplified15.7%
herbie shell --seed 2024192
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
:precision binary64
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))