Octave 3.8, oct_fill_randg

Percentage Accurate: 99.7% → 99.7%
Time: 12.8s
Alternatives: 19
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := a - \frac{1}{3}\\ t\_0 \cdot \left(1 + \frac{1}{\sqrt{9 \cdot t\_0}} \cdot rand\right) \end{array} \end{array} \]
(FPCore (a rand)
 :precision binary64
 (let* ((t_0 (- a (/ 1.0 3.0))))
   (* t_0 (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 t_0))) rand)))))
double code(double a, double rand) {
	double t_0 = a - (1.0 / 3.0);
	return t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand));
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    real(8) :: t_0
    t_0 = a - (1.0d0 / 3.0d0)
    code = t_0 * (1.0d0 + ((1.0d0 / sqrt((9.0d0 * t_0))) * rand))
end function
public static double code(double a, double rand) {
	double t_0 = a - (1.0 / 3.0);
	return t_0 * (1.0 + ((1.0 / Math.sqrt((9.0 * t_0))) * rand));
}
def code(a, rand):
	t_0 = a - (1.0 / 3.0)
	return t_0 * (1.0 + ((1.0 / math.sqrt((9.0 * t_0))) * rand))
function code(a, rand)
	t_0 = Float64(a - Float64(1.0 / 3.0))
	return Float64(t_0 * Float64(1.0 + Float64(Float64(1.0 / sqrt(Float64(9.0 * t_0))) * rand)))
end
function tmp = code(a, rand)
	t_0 = a - (1.0 / 3.0);
	tmp = t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand));
end
code[a_, rand_] := Block[{t$95$0 = N[(a - N[(1.0 / 3.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$0 * N[(1.0 + N[(N[(1.0 / N[Sqrt[N[(9.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a - \frac{1}{3}\\
t\_0 \cdot \left(1 + \frac{1}{\sqrt{9 \cdot t\_0}} \cdot rand\right)
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a - \frac{1}{3}\\ t\_0 \cdot \left(1 + \frac{1}{\sqrt{9 \cdot t\_0}} \cdot rand\right) \end{array} \end{array} \]
(FPCore (a rand)
 :precision binary64
 (let* ((t_0 (- a (/ 1.0 3.0))))
   (* t_0 (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 t_0))) rand)))))
double code(double a, double rand) {
	double t_0 = a - (1.0 / 3.0);
	return t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand));
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    real(8) :: t_0
    t_0 = a - (1.0d0 / 3.0d0)
    code = t_0 * (1.0d0 + ((1.0d0 / sqrt((9.0d0 * t_0))) * rand))
end function
public static double code(double a, double rand) {
	double t_0 = a - (1.0 / 3.0);
	return t_0 * (1.0 + ((1.0 / Math.sqrt((9.0 * t_0))) * rand));
}
def code(a, rand):
	t_0 = a - (1.0 / 3.0)
	return t_0 * (1.0 + ((1.0 / math.sqrt((9.0 * t_0))) * rand))
function code(a, rand)
	t_0 = Float64(a - Float64(1.0 / 3.0))
	return Float64(t_0 * Float64(1.0 + Float64(Float64(1.0 / sqrt(Float64(9.0 * t_0))) * rand)))
end
function tmp = code(a, rand)
	t_0 = a - (1.0 / 3.0);
	tmp = t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand));
end
code[a_, rand_] := Block[{t$95$0 = N[(a - N[(1.0 / 3.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$0 * N[(1.0 + N[(N[(1.0 / N[Sqrt[N[(9.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a - \frac{1}{3}\\
t\_0 \cdot \left(1 + \frac{1}{\sqrt{9 \cdot t\_0}} \cdot rand\right)
\end{array}
\end{array}

Alternative 1: 99.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(1 + \frac{rand}{\sqrt{9 \cdot \left(a + -0.3333333333333333\right)}}\right) \cdot \left(a + -0.3333333333333333\right) \end{array} \]
(FPCore (a rand)
 :precision binary64
 (*
  (+ 1.0 (/ rand (sqrt (* 9.0 (+ a -0.3333333333333333)))))
  (+ a -0.3333333333333333)))
double code(double a, double rand) {
	return (1.0 + (rand / sqrt((9.0 * (a + -0.3333333333333333))))) * (a + -0.3333333333333333);
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    code = (1.0d0 + (rand / sqrt((9.0d0 * (a + (-0.3333333333333333d0)))))) * (a + (-0.3333333333333333d0))
end function
public static double code(double a, double rand) {
	return (1.0 + (rand / Math.sqrt((9.0 * (a + -0.3333333333333333))))) * (a + -0.3333333333333333);
}
def code(a, rand):
	return (1.0 + (rand / math.sqrt((9.0 * (a + -0.3333333333333333))))) * (a + -0.3333333333333333)
function code(a, rand)
	return Float64(Float64(1.0 + Float64(rand / sqrt(Float64(9.0 * Float64(a + -0.3333333333333333))))) * Float64(a + -0.3333333333333333))
end
function tmp = code(a, rand)
	tmp = (1.0 + (rand / sqrt((9.0 * (a + -0.3333333333333333))))) * (a + -0.3333333333333333);
end
code[a_, rand_] := N[(N[(1.0 + N[(rand / N[Sqrt[N[(9.0 * N[(a + -0.3333333333333333), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + -0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(1 + \frac{rand}{\sqrt{9 \cdot \left(a + -0.3333333333333333\right)}}\right) \cdot \left(a + -0.3333333333333333\right)
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
    2. sub-negN/A

      \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
    3. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
    5. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
    6. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
    7. associate-*l/N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
    8. *-lft-identityN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
    10. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
    13. sub-negN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
    14. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
    16. metadata-eval99.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
  4. Add Preprocessing
  5. Final simplification99.9%

    \[\leadsto \left(1 + \frac{rand}{\sqrt{9 \cdot \left(a + -0.3333333333333333\right)}}\right) \cdot \left(a + -0.3333333333333333\right) \]
  6. Add Preprocessing

Alternative 2: 92.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{rand}{3} \cdot \sqrt{a + -0.3333333333333333}\\ \mathbf{if}\;rand \leq -9.4 \cdot 10^{+78}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;rand \leq 1.6 \cdot 10^{+70}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a rand)
 :precision binary64
 (let* ((t_0 (* (/ rand 3.0) (sqrt (+ a -0.3333333333333333)))))
   (if (<= rand -9.4e+78)
     t_0
     (if (<= rand 1.6e+70) (+ a -0.3333333333333333) t_0))))
double code(double a, double rand) {
	double t_0 = (rand / 3.0) * sqrt((a + -0.3333333333333333));
	double tmp;
	if (rand <= -9.4e+78) {
		tmp = t_0;
	} else if (rand <= 1.6e+70) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (rand / 3.0d0) * sqrt((a + (-0.3333333333333333d0)))
    if (rand <= (-9.4d+78)) then
        tmp = t_0
    else if (rand <= 1.6d+70) then
        tmp = a + (-0.3333333333333333d0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double rand) {
	double t_0 = (rand / 3.0) * Math.sqrt((a + -0.3333333333333333));
	double tmp;
	if (rand <= -9.4e+78) {
		tmp = t_0;
	} else if (rand <= 1.6e+70) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, rand):
	t_0 = (rand / 3.0) * math.sqrt((a + -0.3333333333333333))
	tmp = 0
	if rand <= -9.4e+78:
		tmp = t_0
	elif rand <= 1.6e+70:
		tmp = a + -0.3333333333333333
	else:
		tmp = t_0
	return tmp
function code(a, rand)
	t_0 = Float64(Float64(rand / 3.0) * sqrt(Float64(a + -0.3333333333333333)))
	tmp = 0.0
	if (rand <= -9.4e+78)
		tmp = t_0;
	elseif (rand <= 1.6e+70)
		tmp = Float64(a + -0.3333333333333333);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, rand)
	t_0 = (rand / 3.0) * sqrt((a + -0.3333333333333333));
	tmp = 0.0;
	if (rand <= -9.4e+78)
		tmp = t_0;
	elseif (rand <= 1.6e+70)
		tmp = a + -0.3333333333333333;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, rand_] := Block[{t$95$0 = N[(N[(rand / 3.0), $MachinePrecision] * N[Sqrt[N[(a + -0.3333333333333333), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -9.4e+78], t$95$0, If[LessEqual[rand, 1.6e+70], N[(a + -0.3333333333333333), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{rand}{3} \cdot \sqrt{a + -0.3333333333333333}\\
\mathbf{if}\;rand \leq -9.4 \cdot 10^{+78}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;rand \leq 1.6 \cdot 10^{+70}:\\
\;\;\;\;a + -0.3333333333333333\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if rand < -9.40000000000000012e78 or 1.6000000000000001e70 < rand

    1. Initial program 99.5%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around inf

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(rand \cdot \sqrt{a - \frac{1}{3}}\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{3} \cdot rand\right) \cdot \color{blue}{\sqrt{a - \frac{1}{3}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{a - \frac{1}{3}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{a - \frac{1}{3}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a - \frac{1}{3}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a + \frac{-1}{3}\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{-1}{3} + a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      9. *-lowering-*.f6490.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right) \]
    7. Simplified90.8%

      \[\leadsto \color{blue}{\sqrt{-0.3333333333333333 + a} \cdot \left(0.3333333333333333 \cdot rand\right)} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(rand \cdot \color{blue}{\frac{1}{3}}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(rand \cdot \frac{1}{\color{blue}{3}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(\frac{rand}{\color{blue}{3}}\right)\right) \]
      4. /-lowering-/.f6490.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \mathsf{/.f64}\left(rand, \color{blue}{3}\right)\right) \]
    9. Applied egg-rr90.9%

      \[\leadsto \sqrt{-0.3333333333333333 + a} \cdot \color{blue}{\frac{rand}{3}} \]

    if -9.40000000000000012e78 < rand < 1.6000000000000001e70

    1. Initial program 100.0%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval100.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around 0

      \[\leadsto \color{blue}{a - \frac{1}{3}} \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
      2. metadata-evalN/A

        \[\leadsto a + \frac{-1}{3} \]
      3. +-commutativeN/A

        \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
      4. +-lowering-+.f6495.2%

        \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
    7. Simplified95.2%

      \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -9.4 \cdot 10^{+78}:\\ \;\;\;\;\frac{rand}{3} \cdot \sqrt{a + -0.3333333333333333}\\ \mathbf{elif}\;rand \leq 1.6 \cdot 10^{+70}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{rand}{3} \cdot \sqrt{a + -0.3333333333333333}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 93.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{a + -0.3333333333333333} \cdot \left(rand \cdot 0.3333333333333333\right)\\ \mathbf{if}\;rand \leq -5 \cdot 10^{+80}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;rand \leq 2.35 \cdot 10^{+76}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a rand)
 :precision binary64
 (let* ((t_0 (* (sqrt (+ a -0.3333333333333333)) (* rand 0.3333333333333333))))
   (if (<= rand -5e+80)
     t_0
     (if (<= rand 2.35e+76) (+ a -0.3333333333333333) t_0))))
double code(double a, double rand) {
	double t_0 = sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333);
	double tmp;
	if (rand <= -5e+80) {
		tmp = t_0;
	} else if (rand <= 2.35e+76) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt((a + (-0.3333333333333333d0))) * (rand * 0.3333333333333333d0)
    if (rand <= (-5d+80)) then
        tmp = t_0
    else if (rand <= 2.35d+76) then
        tmp = a + (-0.3333333333333333d0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double rand) {
	double t_0 = Math.sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333);
	double tmp;
	if (rand <= -5e+80) {
		tmp = t_0;
	} else if (rand <= 2.35e+76) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, rand):
	t_0 = math.sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333)
	tmp = 0
	if rand <= -5e+80:
		tmp = t_0
	elif rand <= 2.35e+76:
		tmp = a + -0.3333333333333333
	else:
		tmp = t_0
	return tmp
function code(a, rand)
	t_0 = Float64(sqrt(Float64(a + -0.3333333333333333)) * Float64(rand * 0.3333333333333333))
	tmp = 0.0
	if (rand <= -5e+80)
		tmp = t_0;
	elseif (rand <= 2.35e+76)
		tmp = Float64(a + -0.3333333333333333);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, rand)
	t_0 = sqrt((a + -0.3333333333333333)) * (rand * 0.3333333333333333);
	tmp = 0.0;
	if (rand <= -5e+80)
		tmp = t_0;
	elseif (rand <= 2.35e+76)
		tmp = a + -0.3333333333333333;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, rand_] := Block[{t$95$0 = N[(N[Sqrt[N[(a + -0.3333333333333333), $MachinePrecision]], $MachinePrecision] * N[(rand * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -5e+80], t$95$0, If[LessEqual[rand, 2.35e+76], N[(a + -0.3333333333333333), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{a + -0.3333333333333333} \cdot \left(rand \cdot 0.3333333333333333\right)\\
\mathbf{if}\;rand \leq -5 \cdot 10^{+80}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;rand \leq 2.35 \cdot 10^{+76}:\\
\;\;\;\;a + -0.3333333333333333\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if rand < -4.99999999999999961e80 or 2.3500000000000002e76 < rand

    1. Initial program 99.5%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around inf

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(rand \cdot \sqrt{a - \frac{1}{3}}\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{3} \cdot rand\right) \cdot \color{blue}{\sqrt{a - \frac{1}{3}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{a - \frac{1}{3}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{a - \frac{1}{3}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a - \frac{1}{3}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a + \frac{-1}{3}\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{-1}{3} + a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      9. *-lowering-*.f6490.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right) \]
    7. Simplified90.8%

      \[\leadsto \color{blue}{\sqrt{-0.3333333333333333 + a} \cdot \left(0.3333333333333333 \cdot rand\right)} \]

    if -4.99999999999999961e80 < rand < 2.3500000000000002e76

    1. Initial program 100.0%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval100.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around 0

      \[\leadsto \color{blue}{a - \frac{1}{3}} \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
      2. metadata-evalN/A

        \[\leadsto a + \frac{-1}{3} \]
      3. +-commutativeN/A

        \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
      4. +-lowering-+.f6495.2%

        \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
    7. Simplified95.2%

      \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -5 \cdot 10^{+80}:\\ \;\;\;\;\sqrt{a + -0.3333333333333333} \cdot \left(rand \cdot 0.3333333333333333\right)\\ \mathbf{elif}\;rand \leq 2.35 \cdot 10^{+76}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\sqrt{a + -0.3333333333333333} \cdot \left(rand \cdot 0.3333333333333333\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 92.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;rand \leq -1.02 \cdot 10^{+81}:\\ \;\;\;\;\left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\ \mathbf{elif}\;rand \leq 6.2 \cdot 10^{+76}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\sqrt{a} \cdot \frac{rand}{3}\\ \end{array} \end{array} \]
(FPCore (a rand)
 :precision binary64
 (if (<= rand -1.02e+81)
   (* (* rand (sqrt a)) 0.3333333333333333)
   (if (<= rand 6.2e+76) (+ a -0.3333333333333333) (* (sqrt a) (/ rand 3.0)))))
double code(double a, double rand) {
	double tmp;
	if (rand <= -1.02e+81) {
		tmp = (rand * sqrt(a)) * 0.3333333333333333;
	} else if (rand <= 6.2e+76) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = sqrt(a) * (rand / 3.0);
	}
	return tmp;
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    real(8) :: tmp
    if (rand <= (-1.02d+81)) then
        tmp = (rand * sqrt(a)) * 0.3333333333333333d0
    else if (rand <= 6.2d+76) then
        tmp = a + (-0.3333333333333333d0)
    else
        tmp = sqrt(a) * (rand / 3.0d0)
    end if
    code = tmp
end function
public static double code(double a, double rand) {
	double tmp;
	if (rand <= -1.02e+81) {
		tmp = (rand * Math.sqrt(a)) * 0.3333333333333333;
	} else if (rand <= 6.2e+76) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = Math.sqrt(a) * (rand / 3.0);
	}
	return tmp;
}
def code(a, rand):
	tmp = 0
	if rand <= -1.02e+81:
		tmp = (rand * math.sqrt(a)) * 0.3333333333333333
	elif rand <= 6.2e+76:
		tmp = a + -0.3333333333333333
	else:
		tmp = math.sqrt(a) * (rand / 3.0)
	return tmp
function code(a, rand)
	tmp = 0.0
	if (rand <= -1.02e+81)
		tmp = Float64(Float64(rand * sqrt(a)) * 0.3333333333333333);
	elseif (rand <= 6.2e+76)
		tmp = Float64(a + -0.3333333333333333);
	else
		tmp = Float64(sqrt(a) * Float64(rand / 3.0));
	end
	return tmp
end
function tmp_2 = code(a, rand)
	tmp = 0.0;
	if (rand <= -1.02e+81)
		tmp = (rand * sqrt(a)) * 0.3333333333333333;
	elseif (rand <= 6.2e+76)
		tmp = a + -0.3333333333333333;
	else
		tmp = sqrt(a) * (rand / 3.0);
	end
	tmp_2 = tmp;
end
code[a_, rand_] := If[LessEqual[rand, -1.02e+81], N[(N[(rand * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], If[LessEqual[rand, 6.2e+76], N[(a + -0.3333333333333333), $MachinePrecision], N[(N[Sqrt[a], $MachinePrecision] * N[(rand / 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;rand \leq -1.02 \cdot 10^{+81}:\\
\;\;\;\;\left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\

\mathbf{elif}\;rand \leq 6.2 \cdot 10^{+76}:\\
\;\;\;\;a + -0.3333333333333333\\

\mathbf{else}:\\
\;\;\;\;\sqrt{a} \cdot \frac{rand}{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if rand < -1.01999999999999992e81

    1. Initial program 99.6%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{3} \cdot \sqrt{\frac{1}{a}}\right) \cdot \color{blue}{rand}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\sqrt{\frac{1}{a}} \cdot \frac{1}{3}\right) \cdot rand\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\sqrt{\frac{1}{a}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{a}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{a}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right)\right)\right) \]
      9. *-lowering-*.f6498.7%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right)\right)\right) \]
    7. Simplified98.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \sqrt{\frac{1}{a}} \cdot \left(0.3333333333333333 \cdot rand\right)\right)} \]
    8. Taylor expanded in a around 0

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(\sqrt{a} \cdot rand\right)} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left(\sqrt{a} \cdot rand\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(rand \cdot \color{blue}{\sqrt{a}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(rand, \color{blue}{\left(\sqrt{a}\right)}\right)\right) \]
      4. sqrt-lowering-sqrt.f6488.4%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(rand, \mathsf{sqrt.f64}\left(a\right)\right)\right) \]
    10. Simplified88.4%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(rand \cdot \sqrt{a}\right)} \]

    if -1.01999999999999992e81 < rand < 6.20000000000000023e76

    1. Initial program 100.0%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval100.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around 0

      \[\leadsto \color{blue}{a - \frac{1}{3}} \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
      2. metadata-evalN/A

        \[\leadsto a + \frac{-1}{3} \]
      3. +-commutativeN/A

        \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
      4. +-lowering-+.f6495.2%

        \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
    7. Simplified95.2%

      \[\leadsto \color{blue}{-0.3333333333333333 + a} \]

    if 6.20000000000000023e76 < rand

    1. Initial program 99.5%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around inf

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(rand \cdot \sqrt{a - \frac{1}{3}}\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{3} \cdot rand\right) \cdot \color{blue}{\sqrt{a - \frac{1}{3}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{a - \frac{1}{3}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{a - \frac{1}{3}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a - \frac{1}{3}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a + \frac{-1}{3}\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{-1}{3} + a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      9. *-lowering-*.f6492.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right) \]
    7. Simplified92.9%

      \[\leadsto \color{blue}{\sqrt{-0.3333333333333333 + a} \cdot \left(0.3333333333333333 \cdot rand\right)} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(rand \cdot \color{blue}{\frac{1}{3}}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(rand \cdot \frac{1}{\color{blue}{3}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(\frac{rand}{\color{blue}{3}}\right)\right) \]
      4. /-lowering-/.f6493.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \mathsf{/.f64}\left(rand, \color{blue}{3}\right)\right) \]
    9. Applied egg-rr93.1%

      \[\leadsto \sqrt{-0.3333333333333333 + a} \cdot \color{blue}{\frac{rand}{3}} \]
    10. Taylor expanded in a around inf

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\sqrt{a}\right)}, \mathsf{/.f64}\left(rand, 3\right)\right) \]
    11. Step-by-step derivation
      1. sqrt-lowering-sqrt.f6490.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(a\right), \mathsf{/.f64}\left(\color{blue}{rand}, 3\right)\right) \]
    12. Simplified90.3%

      \[\leadsto \color{blue}{\sqrt{a}} \cdot \frac{rand}{3} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification93.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -1.02 \cdot 10^{+81}:\\ \;\;\;\;\left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\ \mathbf{elif}\;rand \leq 6.2 \cdot 10^{+76}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\sqrt{a} \cdot \frac{rand}{3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 92.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;rand \leq -2.16 \cdot 10^{+80}:\\ \;\;\;\;\left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\ \mathbf{elif}\;rand \leq 5 \cdot 10^{+72}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;rand \cdot \left(\sqrt{a} \cdot 0.3333333333333333\right)\\ \end{array} \end{array} \]
(FPCore (a rand)
 :precision binary64
 (if (<= rand -2.16e+80)
   (* (* rand (sqrt a)) 0.3333333333333333)
   (if (<= rand 5e+72)
     (+ a -0.3333333333333333)
     (* rand (* (sqrt a) 0.3333333333333333)))))
double code(double a, double rand) {
	double tmp;
	if (rand <= -2.16e+80) {
		tmp = (rand * sqrt(a)) * 0.3333333333333333;
	} else if (rand <= 5e+72) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = rand * (sqrt(a) * 0.3333333333333333);
	}
	return tmp;
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    real(8) :: tmp
    if (rand <= (-2.16d+80)) then
        tmp = (rand * sqrt(a)) * 0.3333333333333333d0
    else if (rand <= 5d+72) then
        tmp = a + (-0.3333333333333333d0)
    else
        tmp = rand * (sqrt(a) * 0.3333333333333333d0)
    end if
    code = tmp
end function
public static double code(double a, double rand) {
	double tmp;
	if (rand <= -2.16e+80) {
		tmp = (rand * Math.sqrt(a)) * 0.3333333333333333;
	} else if (rand <= 5e+72) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = rand * (Math.sqrt(a) * 0.3333333333333333);
	}
	return tmp;
}
def code(a, rand):
	tmp = 0
	if rand <= -2.16e+80:
		tmp = (rand * math.sqrt(a)) * 0.3333333333333333
	elif rand <= 5e+72:
		tmp = a + -0.3333333333333333
	else:
		tmp = rand * (math.sqrt(a) * 0.3333333333333333)
	return tmp
function code(a, rand)
	tmp = 0.0
	if (rand <= -2.16e+80)
		tmp = Float64(Float64(rand * sqrt(a)) * 0.3333333333333333);
	elseif (rand <= 5e+72)
		tmp = Float64(a + -0.3333333333333333);
	else
		tmp = Float64(rand * Float64(sqrt(a) * 0.3333333333333333));
	end
	return tmp
end
function tmp_2 = code(a, rand)
	tmp = 0.0;
	if (rand <= -2.16e+80)
		tmp = (rand * sqrt(a)) * 0.3333333333333333;
	elseif (rand <= 5e+72)
		tmp = a + -0.3333333333333333;
	else
		tmp = rand * (sqrt(a) * 0.3333333333333333);
	end
	tmp_2 = tmp;
end
code[a_, rand_] := If[LessEqual[rand, -2.16e+80], N[(N[(rand * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], If[LessEqual[rand, 5e+72], N[(a + -0.3333333333333333), $MachinePrecision], N[(rand * N[(N[Sqrt[a], $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;rand \leq -2.16 \cdot 10^{+80}:\\
\;\;\;\;\left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\

\mathbf{elif}\;rand \leq 5 \cdot 10^{+72}:\\
\;\;\;\;a + -0.3333333333333333\\

\mathbf{else}:\\
\;\;\;\;rand \cdot \left(\sqrt{a} \cdot 0.3333333333333333\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if rand < -2.16e80

    1. Initial program 99.6%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{3} \cdot \sqrt{\frac{1}{a}}\right) \cdot \color{blue}{rand}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\sqrt{\frac{1}{a}} \cdot \frac{1}{3}\right) \cdot rand\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\sqrt{\frac{1}{a}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{a}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{a}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right)\right)\right) \]
      9. *-lowering-*.f6498.7%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right)\right)\right) \]
    7. Simplified98.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \sqrt{\frac{1}{a}} \cdot \left(0.3333333333333333 \cdot rand\right)\right)} \]
    8. Taylor expanded in a around 0

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(\sqrt{a} \cdot rand\right)} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left(\sqrt{a} \cdot rand\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(rand \cdot \color{blue}{\sqrt{a}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(rand, \color{blue}{\left(\sqrt{a}\right)}\right)\right) \]
      4. sqrt-lowering-sqrt.f6488.4%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(rand, \mathsf{sqrt.f64}\left(a\right)\right)\right) \]
    10. Simplified88.4%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(rand \cdot \sqrt{a}\right)} \]

    if -2.16e80 < rand < 4.99999999999999992e72

    1. Initial program 100.0%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval100.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around 0

      \[\leadsto \color{blue}{a - \frac{1}{3}} \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
      2. metadata-evalN/A

        \[\leadsto a + \frac{-1}{3} \]
      3. +-commutativeN/A

        \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
      4. +-lowering-+.f6495.2%

        \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
    7. Simplified95.2%

      \[\leadsto \color{blue}{-0.3333333333333333 + a} \]

    if 4.99999999999999992e72 < rand

    1. Initial program 99.5%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around inf

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(rand \cdot \sqrt{a - \frac{1}{3}}\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{3} \cdot rand\right) \cdot \color{blue}{\sqrt{a - \frac{1}{3}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{a - \frac{1}{3}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{a - \frac{1}{3}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a - \frac{1}{3}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(a + \frac{-1}{3}\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{-1}{3} + a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right) \]
      9. *-lowering-*.f6492.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\frac{-1}{3}, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right) \]
    7. Simplified92.9%

      \[\leadsto \color{blue}{\sqrt{-0.3333333333333333 + a} \cdot \left(0.3333333333333333 \cdot rand\right)} \]
    8. Taylor expanded in a around inf

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(\sqrt{a} \cdot rand\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{3} \cdot \sqrt{a}\right) \cdot \color{blue}{rand} \]
      2. *-commutativeN/A

        \[\leadsto rand \cdot \color{blue}{\left(\frac{1}{3} \cdot \sqrt{a}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(rand, \color{blue}{\left(\frac{1}{3} \cdot \sqrt{a}\right)}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(rand, \left(\sqrt{a} \cdot \color{blue}{\frac{1}{3}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(rand, \mathsf{*.f64}\left(\left(\sqrt{a}\right), \color{blue}{\frac{1}{3}}\right)\right) \]
      6. sqrt-lowering-sqrt.f6490.2%

        \[\leadsto \mathsf{*.f64}\left(rand, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(a\right), \frac{1}{3}\right)\right) \]
    10. Simplified90.2%

      \[\leadsto \color{blue}{rand \cdot \left(\sqrt{a} \cdot 0.3333333333333333\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification93.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -2.16 \cdot 10^{+80}:\\ \;\;\;\;\left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\ \mathbf{elif}\;rand \leq 5 \cdot 10^{+72}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;rand \cdot \left(\sqrt{a} \cdot 0.3333333333333333\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 92.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\ \mathbf{if}\;rand \leq -6.8 \cdot 10^{+77}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;rand \leq 1.55 \cdot 10^{+75}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a rand)
 :precision binary64
 (let* ((t_0 (* (* rand (sqrt a)) 0.3333333333333333)))
   (if (<= rand -6.8e+77)
     t_0
     (if (<= rand 1.55e+75) (+ a -0.3333333333333333) t_0))))
double code(double a, double rand) {
	double t_0 = (rand * sqrt(a)) * 0.3333333333333333;
	double tmp;
	if (rand <= -6.8e+77) {
		tmp = t_0;
	} else if (rand <= 1.55e+75) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (rand * sqrt(a)) * 0.3333333333333333d0
    if (rand <= (-6.8d+77)) then
        tmp = t_0
    else if (rand <= 1.55d+75) then
        tmp = a + (-0.3333333333333333d0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double rand) {
	double t_0 = (rand * Math.sqrt(a)) * 0.3333333333333333;
	double tmp;
	if (rand <= -6.8e+77) {
		tmp = t_0;
	} else if (rand <= 1.55e+75) {
		tmp = a + -0.3333333333333333;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, rand):
	t_0 = (rand * math.sqrt(a)) * 0.3333333333333333
	tmp = 0
	if rand <= -6.8e+77:
		tmp = t_0
	elif rand <= 1.55e+75:
		tmp = a + -0.3333333333333333
	else:
		tmp = t_0
	return tmp
function code(a, rand)
	t_0 = Float64(Float64(rand * sqrt(a)) * 0.3333333333333333)
	tmp = 0.0
	if (rand <= -6.8e+77)
		tmp = t_0;
	elseif (rand <= 1.55e+75)
		tmp = Float64(a + -0.3333333333333333);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, rand)
	t_0 = (rand * sqrt(a)) * 0.3333333333333333;
	tmp = 0.0;
	if (rand <= -6.8e+77)
		tmp = t_0;
	elseif (rand <= 1.55e+75)
		tmp = a + -0.3333333333333333;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, rand_] := Block[{t$95$0 = N[(N[(rand * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]}, If[LessEqual[rand, -6.8e+77], t$95$0, If[LessEqual[rand, 1.55e+75], N[(a + -0.3333333333333333), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\
\mathbf{if}\;rand \leq -6.8 \cdot 10^{+77}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;rand \leq 1.55 \cdot 10^{+75}:\\
\;\;\;\;a + -0.3333333333333333\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if rand < -6.79999999999999993e77 or 1.5500000000000001e75 < rand

    1. Initial program 99.5%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{3} \cdot \sqrt{\frac{1}{a}}\right) \cdot \color{blue}{rand}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\sqrt{\frac{1}{a}} \cdot \frac{1}{3}\right) \cdot rand\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\sqrt{\frac{1}{a}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{a}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{a}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right)\right)\right) \]
      9. *-lowering-*.f6497.7%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right)\right)\right) \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \sqrt{\frac{1}{a}} \cdot \left(0.3333333333333333 \cdot rand\right)\right)} \]
    8. Taylor expanded in a around 0

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(\sqrt{a} \cdot rand\right)} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left(\sqrt{a} \cdot rand\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(rand \cdot \color{blue}{\sqrt{a}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(rand, \color{blue}{\left(\sqrt{a}\right)}\right)\right) \]
      4. sqrt-lowering-sqrt.f6489.2%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(rand, \mathsf{sqrt.f64}\left(a\right)\right)\right) \]
    10. Simplified89.2%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(rand \cdot \sqrt{a}\right)} \]

    if -6.79999999999999993e77 < rand < 1.5500000000000001e75

    1. Initial program 100.0%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval100.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in rand around 0

      \[\leadsto \color{blue}{a - \frac{1}{3}} \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
      2. metadata-evalN/A

        \[\leadsto a + \frac{-1}{3} \]
      3. +-commutativeN/A

        \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
      4. +-lowering-+.f6495.2%

        \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
    7. Simplified95.2%

      \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -6.8 \cdot 10^{+77}:\\ \;\;\;\;\left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\ \mathbf{elif}\;rand \leq 1.55 \cdot 10^{+75}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 98.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(1 + \frac{rand}{\sqrt{a \cdot 9}}\right) \cdot \left(a + -0.3333333333333333\right) \end{array} \]
(FPCore (a rand)
 :precision binary64
 (* (+ 1.0 (/ rand (sqrt (* a 9.0)))) (+ a -0.3333333333333333)))
double code(double a, double rand) {
	return (1.0 + (rand / sqrt((a * 9.0)))) * (a + -0.3333333333333333);
}
real(8) function code(a, rand)
    real(8), intent (in) :: a
    real(8), intent (in) :: rand
    code = (1.0d0 + (rand / sqrt((a * 9.0d0)))) * (a + (-0.3333333333333333d0))
end function
public static double code(double a, double rand) {
	return (1.0 + (rand / Math.sqrt((a * 9.0)))) * (a + -0.3333333333333333);
}
def code(a, rand):
	return (1.0 + (rand / math.sqrt((a * 9.0)))) * (a + -0.3333333333333333)
function code(a, rand)
	return Float64(Float64(1.0 + Float64(rand / sqrt(Float64(a * 9.0)))) * Float64(a + -0.3333333333333333))
end
function tmp = code(a, rand)
	tmp = (1.0 + (rand / sqrt((a * 9.0)))) * (a + -0.3333333333333333);
end
code[a_, rand_] := N[(N[(1.0 + N[(rand / N[Sqrt[N[(a * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + -0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(1 + \frac{rand}{\sqrt{a \cdot 9}}\right) \cdot \left(a + -0.3333333333333333\right)
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
    2. sub-negN/A

      \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
    3. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
    5. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
    6. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
    7. associate-*l/N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
    8. *-lft-identityN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
    10. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
    13. sub-negN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
    14. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
    16. metadata-eval99.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf

    \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\color{blue}{a}, 9\right)\right)\right)\right)\right) \]
  6. Step-by-step derivation
    1. Simplified98.8%

      \[\leadsto \left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\color{blue}{a} \cdot 9}}\right) \]
    2. Final simplification98.8%

      \[\leadsto \left(1 + \frac{rand}{\sqrt{a \cdot 9}}\right) \cdot \left(a + -0.3333333333333333\right) \]
    3. Add Preprocessing

    Alternative 8: 97.6% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ a + \frac{rand \cdot \sqrt{a}}{3} \end{array} \]
    (FPCore (a rand) :precision binary64 (+ a (/ (* rand (sqrt a)) 3.0)))
    double code(double a, double rand) {
    	return a + ((rand * sqrt(a)) / 3.0);
    }
    
    real(8) function code(a, rand)
        real(8), intent (in) :: a
        real(8), intent (in) :: rand
        code = a + ((rand * sqrt(a)) / 3.0d0)
    end function
    
    public static double code(double a, double rand) {
    	return a + ((rand * Math.sqrt(a)) / 3.0);
    }
    
    def code(a, rand):
    	return a + ((rand * math.sqrt(a)) / 3.0)
    
    function code(a, rand)
    	return Float64(a + Float64(Float64(rand * sqrt(a)) / 3.0))
    end
    
    function tmp = code(a, rand)
    	tmp = a + ((rand * sqrt(a)) / 3.0);
    end
    
    code[a_, rand_] := N[(a + N[(N[(rand * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    a + \frac{rand \cdot \sqrt{a}}{3}
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{3} \cdot \sqrt{\frac{1}{a}}\right) \cdot \color{blue}{rand}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\sqrt{\frac{1}{a}} \cdot \frac{1}{3}\right) \cdot rand\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\sqrt{\frac{1}{a}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{a}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{a}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right)\right)\right) \]
      9. *-lowering-*.f6497.7%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right)\right)\right) \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \sqrt{\frac{1}{a}} \cdot \left(0.3333333333333333 \cdot rand\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right) + \color{blue}{1}\right) \]
      2. distribute-lft-inN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right) + \color{blue}{a \cdot 1} \]
      3. *-rgt-identityN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right) + a \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right)\right), \color{blue}{a}\right) \]
    9. Applied egg-rr97.8%

      \[\leadsto \color{blue}{\frac{rand}{3} \cdot \sqrt{a} + a} \]
    10. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{rand \cdot \sqrt{a}}{3}\right), a\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(rand \cdot \sqrt{a}\right), 3\right), a\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(rand, \left(\sqrt{a}\right)\right), 3\right), a\right) \]
      4. sqrt-lowering-sqrt.f6497.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(rand, \mathsf{sqrt.f64}\left(a\right)\right), 3\right), a\right) \]
    11. Applied egg-rr97.8%

      \[\leadsto \color{blue}{\frac{rand \cdot \sqrt{a}}{3}} + a \]
    12. Final simplification97.8%

      \[\leadsto a + \frac{rand \cdot \sqrt{a}}{3} \]
    13. Add Preprocessing

    Alternative 9: 97.7% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ a + \sqrt{a} \cdot \frac{rand}{3} \end{array} \]
    (FPCore (a rand) :precision binary64 (+ a (* (sqrt a) (/ rand 3.0))))
    double code(double a, double rand) {
    	return a + (sqrt(a) * (rand / 3.0));
    }
    
    real(8) function code(a, rand)
        real(8), intent (in) :: a
        real(8), intent (in) :: rand
        code = a + (sqrt(a) * (rand / 3.0d0))
    end function
    
    public static double code(double a, double rand) {
    	return a + (Math.sqrt(a) * (rand / 3.0));
    }
    
    def code(a, rand):
    	return a + (math.sqrt(a) * (rand / 3.0))
    
    function code(a, rand)
    	return Float64(a + Float64(sqrt(a) * Float64(rand / 3.0)))
    end
    
    function tmp = code(a, rand)
    	tmp = a + (sqrt(a) * (rand / 3.0));
    end
    
    code[a_, rand_] := N[(a + N[(N[Sqrt[a], $MachinePrecision] * N[(rand / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    a + \sqrt{a} \cdot \frac{rand}{3}
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{3} \cdot \sqrt{\frac{1}{a}}\right) \cdot \color{blue}{rand}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\sqrt{\frac{1}{a}} \cdot \frac{1}{3}\right) \cdot rand\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\sqrt{\frac{1}{a}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{a}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{a}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right)\right)\right) \]
      9. *-lowering-*.f6497.7%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right)\right)\right) \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \sqrt{\frac{1}{a}} \cdot \left(0.3333333333333333 \cdot rand\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right) + \color{blue}{1}\right) \]
      2. distribute-lft-inN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right) + \color{blue}{a \cdot 1} \]
      3. *-rgt-identityN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right) + a \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right)\right), \color{blue}{a}\right) \]
    9. Applied egg-rr97.8%

      \[\leadsto \color{blue}{\frac{rand}{3} \cdot \sqrt{a} + a} \]
    10. Final simplification97.8%

      \[\leadsto a + \sqrt{a} \cdot \frac{rand}{3} \]
    11. Add Preprocessing

    Alternative 10: 97.7% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ a + rand \cdot \frac{\sqrt{a}}{3} \end{array} \]
    (FPCore (a rand) :precision binary64 (+ a (* rand (/ (sqrt a) 3.0))))
    double code(double a, double rand) {
    	return a + (rand * (sqrt(a) / 3.0));
    }
    
    real(8) function code(a, rand)
        real(8), intent (in) :: a
        real(8), intent (in) :: rand
        code = a + (rand * (sqrt(a) / 3.0d0))
    end function
    
    public static double code(double a, double rand) {
    	return a + (rand * (Math.sqrt(a) / 3.0));
    }
    
    def code(a, rand):
    	return a + (rand * (math.sqrt(a) / 3.0))
    
    function code(a, rand)
    	return Float64(a + Float64(rand * Float64(sqrt(a) / 3.0)))
    end
    
    function tmp = code(a, rand)
    	tmp = a + (rand * (sqrt(a) / 3.0));
    end
    
    code[a_, rand_] := N[(a + N[(rand * N[(N[Sqrt[a], $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    a + rand \cdot \frac{\sqrt{a}}{3}
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{3} \cdot \sqrt{\frac{1}{a}}\right) \cdot \color{blue}{rand}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\sqrt{\frac{1}{a}} \cdot \frac{1}{3}\right) \cdot rand\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\sqrt{\frac{1}{a}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{a}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{a}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right)\right)\right) \]
      9. *-lowering-*.f6497.7%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right)\right)\right) \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \sqrt{\frac{1}{a}} \cdot \left(0.3333333333333333 \cdot rand\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right) + \color{blue}{1}\right) \]
      2. distribute-lft-inN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right) + \color{blue}{a \cdot 1} \]
      3. *-rgt-identityN/A

        \[\leadsto a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right) + a \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(a \cdot \left(\sqrt{\frac{1}{a}} \cdot \left(\frac{1}{3} \cdot rand\right)\right)\right), \color{blue}{a}\right) \]
    9. Applied egg-rr97.8%

      \[\leadsto \color{blue}{\frac{rand}{3} \cdot \sqrt{a} + a} \]
    10. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{rand \cdot \sqrt{a}}{3}\right), a\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(rand \cdot \frac{\sqrt{a}}{3}\right), a\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(rand, \left(\frac{\sqrt{a}}{3}\right)\right), a\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(rand, \mathsf{/.f64}\left(\left(\sqrt{a}\right), 3\right)\right), a\right) \]
      5. sqrt-lowering-sqrt.f6497.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(rand, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(a\right), 3\right)\right), a\right) \]
    11. Applied egg-rr97.8%

      \[\leadsto \color{blue}{rand \cdot \frac{\sqrt{a}}{3}} + a \]
    12. Final simplification97.8%

      \[\leadsto a + rand \cdot \frac{\sqrt{a}}{3} \]
    13. Add Preprocessing

    Alternative 11: 97.6% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ a + \left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333 \end{array} \]
    (FPCore (a rand)
     :precision binary64
     (+ a (* (* rand (sqrt a)) 0.3333333333333333)))
    double code(double a, double rand) {
    	return a + ((rand * sqrt(a)) * 0.3333333333333333);
    }
    
    real(8) function code(a, rand)
        real(8), intent (in) :: a
        real(8), intent (in) :: rand
        code = a + ((rand * sqrt(a)) * 0.3333333333333333d0)
    end function
    
    public static double code(double a, double rand) {
    	return a + ((rand * Math.sqrt(a)) * 0.3333333333333333);
    }
    
    def code(a, rand):
    	return a + ((rand * math.sqrt(a)) * 0.3333333333333333)
    
    function code(a, rand)
    	return Float64(a + Float64(Float64(rand * sqrt(a)) * 0.3333333333333333))
    end
    
    function tmp = code(a, rand)
    	tmp = a + ((rand * sqrt(a)) * 0.3333333333333333);
    end
    
    code[a_, rand_] := N[(a + N[(N[(rand * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    a + \left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      8. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
      16. metadata-eval99.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left(1 + \frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{3} \cdot \left(\sqrt{\frac{1}{a}} \cdot rand\right)\right)}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{3} \cdot \sqrt{\frac{1}{a}}\right) \cdot \color{blue}{rand}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(\sqrt{\frac{1}{a}} \cdot \frac{1}{3}\right) \cdot rand\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \left(\sqrt{\frac{1}{a}} \cdot \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{a}}\right), \color{blue}{\left(\frac{1}{3} \cdot rand\right)}\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{a}\right)\right), \left(\color{blue}{\frac{1}{3}} \cdot rand\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \left(\frac{1}{3} \cdot rand\right)\right)\right)\right) \]
      9. *-lowering-*.f6497.7%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, a\right)\right), \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{rand}\right)\right)\right)\right) \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \sqrt{\frac{1}{a}} \cdot \left(0.3333333333333333 \cdot rand\right)\right)} \]
    8. Taylor expanded in a around 0

      \[\leadsto \color{blue}{a + \frac{1}{3} \cdot \left(\sqrt{a} \cdot rand\right)} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(\frac{1}{3} \cdot \left(\sqrt{a} \cdot rand\right)\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left(\sqrt{a} \cdot rand\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{3}, \left(rand \cdot \color{blue}{\sqrt{a}}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(rand, \color{blue}{\left(\sqrt{a}\right)}\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f6497.7%

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{*.f64}\left(rand, \mathsf{sqrt.f64}\left(a\right)\right)\right)\right) \]
    10. Simplified97.7%

      \[\leadsto \color{blue}{a + 0.3333333333333333 \cdot \left(rand \cdot \sqrt{a}\right)} \]
    11. Final simplification97.7%

      \[\leadsto a + \left(rand \cdot \sqrt{a}\right) \cdot 0.3333333333333333 \]
    12. Add Preprocessing

    Alternative 12: 75.4% accurate, 4.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot \left(a \cdot a\right) + -0.037037037037037035\\ \mathbf{if}\;rand \leq -6.8 \cdot 10^{+131}:\\ \;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(\left(a \cdot a\right) \cdot -729\right)\right)\right)\\ \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a rand)
     :precision binary64
     (let* ((t_0 (+ (* a (* a a)) -0.037037037037037035)))
       (if (<= rand -6.8e+131)
         (* t_0 (+ 9.0 (* a (+ -27.0 (* a (* (* a a) -729.0))))))
         (if (<= rand 7e+111)
           (+ a -0.3333333333333333)
           (* t_0 (+ 9.0 (* a (+ -27.0 (* a (* a 243.0))))))))))
    double code(double a, double rand) {
    	double t_0 = (a * (a * a)) + -0.037037037037037035;
    	double tmp;
    	if (rand <= -6.8e+131) {
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * ((a * a) * -729.0)))));
    	} else if (rand <= 7e+111) {
    		tmp = a + -0.3333333333333333;
    	} else {
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
    	}
    	return tmp;
    }
    
    real(8) function code(a, rand)
        real(8), intent (in) :: a
        real(8), intent (in) :: rand
        real(8) :: t_0
        real(8) :: tmp
        t_0 = (a * (a * a)) + (-0.037037037037037035d0)
        if (rand <= (-6.8d+131)) then
            tmp = t_0 * (9.0d0 + (a * ((-27.0d0) + (a * ((a * a) * (-729.0d0))))))
        else if (rand <= 7d+111) then
            tmp = a + (-0.3333333333333333d0)
        else
            tmp = t_0 * (9.0d0 + (a * ((-27.0d0) + (a * (a * 243.0d0)))))
        end if
        code = tmp
    end function
    
    public static double code(double a, double rand) {
    	double t_0 = (a * (a * a)) + -0.037037037037037035;
    	double tmp;
    	if (rand <= -6.8e+131) {
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * ((a * a) * -729.0)))));
    	} else if (rand <= 7e+111) {
    		tmp = a + -0.3333333333333333;
    	} else {
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
    	}
    	return tmp;
    }
    
    def code(a, rand):
    	t_0 = (a * (a * a)) + -0.037037037037037035
    	tmp = 0
    	if rand <= -6.8e+131:
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * ((a * a) * -729.0)))))
    	elif rand <= 7e+111:
    		tmp = a + -0.3333333333333333
    	else:
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))))
    	return tmp
    
    function code(a, rand)
    	t_0 = Float64(Float64(a * Float64(a * a)) + -0.037037037037037035)
    	tmp = 0.0
    	if (rand <= -6.8e+131)
    		tmp = Float64(t_0 * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * Float64(Float64(a * a) * -729.0))))));
    	elseif (rand <= 7e+111)
    		tmp = Float64(a + -0.3333333333333333);
    	else
    		tmp = Float64(t_0 * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * Float64(a * 243.0))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, rand)
    	t_0 = (a * (a * a)) + -0.037037037037037035;
    	tmp = 0.0;
    	if (rand <= -6.8e+131)
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * ((a * a) * -729.0)))));
    	elseif (rand <= 7e+111)
    		tmp = a + -0.3333333333333333;
    	else
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, rand_] := Block[{t$95$0 = N[(N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision] + -0.037037037037037035), $MachinePrecision]}, If[LessEqual[rand, -6.8e+131], N[(t$95$0 * N[(9.0 + N[(a * N[(-27.0 + N[(a * N[(N[(a * a), $MachinePrecision] * -729.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 7e+111], N[(a + -0.3333333333333333), $MachinePrecision], N[(t$95$0 * N[(9.0 + N[(a * N[(-27.0 + N[(a * N[(a * 243.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := a \cdot \left(a \cdot a\right) + -0.037037037037037035\\
    \mathbf{if}\;rand \leq -6.8 \cdot 10^{+131}:\\
    \;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(\left(a \cdot a\right) \cdot -729\right)\right)\right)\\
    
    \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\
    \;\;\;\;a + -0.3333333333333333\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if rand < -6.79999999999999972e131

      1. Initial program 99.6%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval99.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified99.7%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f640.4%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified0.4%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
      8. Step-by-step derivation
        1. flip3-+N/A

          \[\leadsto \frac{{\frac{-1}{3}}^{3} + {a}^{3}}{\color{blue}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        2. div-invN/A

          \[\leadsto \left({\frac{-1}{3}}^{3} + {a}^{3}\right) \cdot \color{blue}{\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\frac{-1}{3}}^{3} + {a}^{3}\right), \color{blue}{\left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)}\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left({a}^{3} + {\frac{-1}{3}}^{3}\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left({a}^{3}\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        6. cube-multN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(a \cdot \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \color{blue}{\left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(\color{blue}{a \cdot a} - \frac{-1}{3} \cdot a\right)\right)\right)\right) \]
        13. distribute-rgt-out--N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(a \cdot \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        15. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \frac{1}{3}\right)\right)\right)\right)\right) \]
        17. +-lowering-+.f640.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right) \]
      9. Applied egg-rr0.2%

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \frac{1}{0.1111111111111111 + a \cdot \left(a + 0.3333333333333333\right)}} \]
      10. Taylor expanded in a around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(9 + a \cdot \left({a}^{2} \cdot \left(243 + -729 \cdot a\right) - 27\right)\right)}\right) \]
      11. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \color{blue}{\left(a \cdot \left({a}^{2} \cdot \left(243 + -729 \cdot a\right) - 27\right)\right)}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \color{blue}{\left({a}^{2} \cdot \left(243 + -729 \cdot a\right) - 27\right)}\right)\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left({a}^{2} \cdot \left(243 + -729 \cdot a\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right)}\right)\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left({a}^{2} \cdot \left(243 + -729 \cdot a\right) + -27\right)\right)\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left(-27 + \color{blue}{{a}^{2} \cdot \left(243 + -729 \cdot a\right)}\right)\right)\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \color{blue}{\left({a}^{2} \cdot \left(243 + -729 \cdot a\right)\right)}\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left(\left(a \cdot a\right) \cdot \left(\color{blue}{243} + -729 \cdot a\right)\right)\right)\right)\right)\right) \]
        8. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left(a \cdot \color{blue}{\left(a \cdot \left(243 + -729 \cdot a\right)\right)}\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \color{blue}{\left(a \cdot \left(243 + -729 \cdot a\right)\right)}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left(243 + -729 \cdot a\right)}\right)\right)\right)\right)\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(243, \color{blue}{\left(-729 \cdot a\right)}\right)\right)\right)\right)\right)\right)\right) \]
        12. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(243, \left(a \cdot \color{blue}{-729}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f6441.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(243, \mathsf{*.f64}\left(a, \color{blue}{-729}\right)\right)\right)\right)\right)\right)\right)\right) \]
      12. Simplified41.2%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot \left(243 + a \cdot -729\right)\right)\right)\right)} \]
      13. Taylor expanded in a around inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \color{blue}{\left(-729 \cdot {a}^{2}\right)}\right)\right)\right)\right)\right) \]
      14. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \left({a}^{2} \cdot \color{blue}{-729}\right)\right)\right)\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({a}^{2}\right), \color{blue}{-729}\right)\right)\right)\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(a \cdot a\right), -729\right)\right)\right)\right)\right)\right) \]
        4. *-lowering-*.f6441.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), -729\right)\right)\right)\right)\right)\right) \]
      15. Simplified41.2%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(9 + a \cdot \left(-27 + a \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot -729\right)}\right)\right) \]

      if -6.79999999999999972e131 < rand < 7.0000000000000004e111

      1. Initial program 99.9%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval100.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f6488.4%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified88.4%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]

      if 7.0000000000000004e111 < rand

      1. Initial program 99.5%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval99.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified99.7%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f646.3%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified6.3%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
      8. Step-by-step derivation
        1. flip3-+N/A

          \[\leadsto \frac{{\frac{-1}{3}}^{3} + {a}^{3}}{\color{blue}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        2. div-invN/A

          \[\leadsto \left({\frac{-1}{3}}^{3} + {a}^{3}\right) \cdot \color{blue}{\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\frac{-1}{3}}^{3} + {a}^{3}\right), \color{blue}{\left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)}\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left({a}^{3} + {\frac{-1}{3}}^{3}\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left({a}^{3}\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        6. cube-multN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(a \cdot \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \color{blue}{\left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(\color{blue}{a \cdot a} - \frac{-1}{3} \cdot a\right)\right)\right)\right) \]
        13. distribute-rgt-out--N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(a \cdot \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        15. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \frac{1}{3}\right)\right)\right)\right)\right) \]
        17. +-lowering-+.f643.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right) \]
      9. Applied egg-rr3.2%

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \frac{1}{0.1111111111111111 + a \cdot \left(a + 0.3333333333333333\right)}} \]
      10. Taylor expanded in a around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(9 + a \cdot \left(243 \cdot {a}^{2} - 27\right)\right)}\right) \]
      11. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \color{blue}{\left(a \cdot \left(243 \cdot {a}^{2} - 27\right)\right)}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \color{blue}{\left(243 \cdot {a}^{2} - 27\right)}\right)\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left(243 \cdot {a}^{2} + \color{blue}{\left(\mathsf{neg}\left(27\right)\right)}\right)\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left(243 \cdot {a}^{2} + -27\right)\right)\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left(-27 + \color{blue}{243 \cdot {a}^{2}}\right)\right)\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \color{blue}{\left(243 \cdot {a}^{2}\right)}\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left({a}^{2} \cdot \color{blue}{243}\right)\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left(\left(a \cdot a\right) \cdot 243\right)\right)\right)\right)\right) \]
        9. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left(a \cdot \color{blue}{\left(a \cdot 243\right)}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \color{blue}{\left(a \cdot 243\right)}\right)\right)\right)\right)\right) \]
        11. *-lowering-*.f6438.3%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{243}\right)\right)\right)\right)\right)\right) \]
      12. Simplified38.3%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification76.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -6.8 \cdot 10^{+131}:\\ \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(\left(a \cdot a\right) \cdot -729\right)\right)\right)\\ \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 75.1% accurate, 4.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot \left(a \cdot a\right) + -0.037037037037037035\\ \mathbf{if}\;rand \leq -4.6 \cdot 10^{+132}:\\ \;\;\;\;t\_0 \cdot \left(a \cdot -27\right)\\ \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a rand)
     :precision binary64
     (let* ((t_0 (+ (* a (* a a)) -0.037037037037037035)))
       (if (<= rand -4.6e+132)
         (* t_0 (* a -27.0))
         (if (<= rand 7e+111)
           (+ a -0.3333333333333333)
           (* t_0 (+ 9.0 (* a (+ -27.0 (* a (* a 243.0))))))))))
    double code(double a, double rand) {
    	double t_0 = (a * (a * a)) + -0.037037037037037035;
    	double tmp;
    	if (rand <= -4.6e+132) {
    		tmp = t_0 * (a * -27.0);
    	} else if (rand <= 7e+111) {
    		tmp = a + -0.3333333333333333;
    	} else {
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
    	}
    	return tmp;
    }
    
    real(8) function code(a, rand)
        real(8), intent (in) :: a
        real(8), intent (in) :: rand
        real(8) :: t_0
        real(8) :: tmp
        t_0 = (a * (a * a)) + (-0.037037037037037035d0)
        if (rand <= (-4.6d+132)) then
            tmp = t_0 * (a * (-27.0d0))
        else if (rand <= 7d+111) then
            tmp = a + (-0.3333333333333333d0)
        else
            tmp = t_0 * (9.0d0 + (a * ((-27.0d0) + (a * (a * 243.0d0)))))
        end if
        code = tmp
    end function
    
    public static double code(double a, double rand) {
    	double t_0 = (a * (a * a)) + -0.037037037037037035;
    	double tmp;
    	if (rand <= -4.6e+132) {
    		tmp = t_0 * (a * -27.0);
    	} else if (rand <= 7e+111) {
    		tmp = a + -0.3333333333333333;
    	} else {
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
    	}
    	return tmp;
    }
    
    def code(a, rand):
    	t_0 = (a * (a * a)) + -0.037037037037037035
    	tmp = 0
    	if rand <= -4.6e+132:
    		tmp = t_0 * (a * -27.0)
    	elif rand <= 7e+111:
    		tmp = a + -0.3333333333333333
    	else:
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))))
    	return tmp
    
    function code(a, rand)
    	t_0 = Float64(Float64(a * Float64(a * a)) + -0.037037037037037035)
    	tmp = 0.0
    	if (rand <= -4.6e+132)
    		tmp = Float64(t_0 * Float64(a * -27.0));
    	elseif (rand <= 7e+111)
    		tmp = Float64(a + -0.3333333333333333);
    	else
    		tmp = Float64(t_0 * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * Float64(a * 243.0))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, rand)
    	t_0 = (a * (a * a)) + -0.037037037037037035;
    	tmp = 0.0;
    	if (rand <= -4.6e+132)
    		tmp = t_0 * (a * -27.0);
    	elseif (rand <= 7e+111)
    		tmp = a + -0.3333333333333333;
    	else
    		tmp = t_0 * (9.0 + (a * (-27.0 + (a * (a * 243.0)))));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, rand_] := Block[{t$95$0 = N[(N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision] + -0.037037037037037035), $MachinePrecision]}, If[LessEqual[rand, -4.6e+132], N[(t$95$0 * N[(a * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 7e+111], N[(a + -0.3333333333333333), $MachinePrecision], N[(t$95$0 * N[(9.0 + N[(a * N[(-27.0 + N[(a * N[(a * 243.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := a \cdot \left(a \cdot a\right) + -0.037037037037037035\\
    \mathbf{if}\;rand \leq -4.6 \cdot 10^{+132}:\\
    \;\;\;\;t\_0 \cdot \left(a \cdot -27\right)\\
    
    \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\
    \;\;\;\;a + -0.3333333333333333\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if rand < -4.6000000000000003e132

      1. Initial program 99.6%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval99.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified99.7%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f640.4%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified0.4%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
      8. Step-by-step derivation
        1. flip3-+N/A

          \[\leadsto \frac{{\frac{-1}{3}}^{3} + {a}^{3}}{\color{blue}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        2. div-invN/A

          \[\leadsto \left({\frac{-1}{3}}^{3} + {a}^{3}\right) \cdot \color{blue}{\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\frac{-1}{3}}^{3} + {a}^{3}\right), \color{blue}{\left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)}\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left({a}^{3} + {\frac{-1}{3}}^{3}\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left({a}^{3}\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        6. cube-multN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(a \cdot \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \color{blue}{\left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(\color{blue}{a \cdot a} - \frac{-1}{3} \cdot a\right)\right)\right)\right) \]
        13. distribute-rgt-out--N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(a \cdot \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        15. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \frac{1}{3}\right)\right)\right)\right)\right) \]
        17. +-lowering-+.f640.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right) \]
      9. Applied egg-rr0.2%

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \frac{1}{0.1111111111111111 + a \cdot \left(a + 0.3333333333333333\right)}} \]
      10. Taylor expanded in a around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(9 + -27 \cdot a\right)}\right) \]
      11. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \color{blue}{\left(-27 \cdot a\right)}\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \left(a \cdot \color{blue}{-27}\right)\right)\right) \]
        3. *-lowering-*.f6438.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \color{blue}{-27}\right)\right)\right) \]
      12. Simplified38.7%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(9 + a \cdot -27\right)} \]
      13. Taylor expanded in a around inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(-27 \cdot a\right)}\right) \]
      14. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(a \cdot \color{blue}{-27}\right)\right) \]
        2. *-lowering-*.f6438.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{*.f64}\left(a, \color{blue}{-27}\right)\right) \]
      15. Simplified38.7%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(a \cdot -27\right)} \]

      if -4.6000000000000003e132 < rand < 7.0000000000000004e111

      1. Initial program 99.9%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval100.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f6488.4%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified88.4%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]

      if 7.0000000000000004e111 < rand

      1. Initial program 99.5%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval99.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified99.7%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f646.3%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified6.3%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
      8. Step-by-step derivation
        1. flip3-+N/A

          \[\leadsto \frac{{\frac{-1}{3}}^{3} + {a}^{3}}{\color{blue}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        2. div-invN/A

          \[\leadsto \left({\frac{-1}{3}}^{3} + {a}^{3}\right) \cdot \color{blue}{\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\frac{-1}{3}}^{3} + {a}^{3}\right), \color{blue}{\left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)}\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left({a}^{3} + {\frac{-1}{3}}^{3}\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left({a}^{3}\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        6. cube-multN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(a \cdot \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \color{blue}{\left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(\color{blue}{a \cdot a} - \frac{-1}{3} \cdot a\right)\right)\right)\right) \]
        13. distribute-rgt-out--N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(a \cdot \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        15. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \frac{1}{3}\right)\right)\right)\right)\right) \]
        17. +-lowering-+.f643.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right) \]
      9. Applied egg-rr3.2%

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \frac{1}{0.1111111111111111 + a \cdot \left(a + 0.3333333333333333\right)}} \]
      10. Taylor expanded in a around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(9 + a \cdot \left(243 \cdot {a}^{2} - 27\right)\right)}\right) \]
      11. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \color{blue}{\left(a \cdot \left(243 \cdot {a}^{2} - 27\right)\right)}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \color{blue}{\left(243 \cdot {a}^{2} - 27\right)}\right)\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left(243 \cdot {a}^{2} + \color{blue}{\left(\mathsf{neg}\left(27\right)\right)}\right)\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left(243 \cdot {a}^{2} + -27\right)\right)\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left(-27 + \color{blue}{243 \cdot {a}^{2}}\right)\right)\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \color{blue}{\left(243 \cdot {a}^{2}\right)}\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left({a}^{2} \cdot \color{blue}{243}\right)\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left(\left(a \cdot a\right) \cdot 243\right)\right)\right)\right)\right) \]
        9. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left(a \cdot \color{blue}{\left(a \cdot 243\right)}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \color{blue}{\left(a \cdot 243\right)}\right)\right)\right)\right)\right) \]
        11. *-lowering-*.f6438.3%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{243}\right)\right)\right)\right)\right)\right) \]
      12. Simplified38.3%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification76.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -4.6 \cdot 10^{+132}:\\ \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(a \cdot -27\right)\\ \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot 243\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 74.8% accurate, 4.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;rand \leq -6.8 \cdot 10^{+133}:\\ \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(a \cdot -27\right)\\ \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;-0.037037037037037035 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot \left(243 + a \cdot -729\right)\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a rand)
     :precision binary64
     (if (<= rand -6.8e+133)
       (* (+ (* a (* a a)) -0.037037037037037035) (* a -27.0))
       (if (<= rand 7e+111)
         (+ a -0.3333333333333333)
         (*
          -0.037037037037037035
          (+ 9.0 (* a (+ -27.0 (* a (* a (+ 243.0 (* a -729.0)))))))))))
    double code(double a, double rand) {
    	double tmp;
    	if (rand <= -6.8e+133) {
    		tmp = ((a * (a * a)) + -0.037037037037037035) * (a * -27.0);
    	} else if (rand <= 7e+111) {
    		tmp = a + -0.3333333333333333;
    	} else {
    		tmp = -0.037037037037037035 * (9.0 + (a * (-27.0 + (a * (a * (243.0 + (a * -729.0)))))));
    	}
    	return tmp;
    }
    
    real(8) function code(a, rand)
        real(8), intent (in) :: a
        real(8), intent (in) :: rand
        real(8) :: tmp
        if (rand <= (-6.8d+133)) then
            tmp = ((a * (a * a)) + (-0.037037037037037035d0)) * (a * (-27.0d0))
        else if (rand <= 7d+111) then
            tmp = a + (-0.3333333333333333d0)
        else
            tmp = (-0.037037037037037035d0) * (9.0d0 + (a * ((-27.0d0) + (a * (a * (243.0d0 + (a * (-729.0d0))))))))
        end if
        code = tmp
    end function
    
    public static double code(double a, double rand) {
    	double tmp;
    	if (rand <= -6.8e+133) {
    		tmp = ((a * (a * a)) + -0.037037037037037035) * (a * -27.0);
    	} else if (rand <= 7e+111) {
    		tmp = a + -0.3333333333333333;
    	} else {
    		tmp = -0.037037037037037035 * (9.0 + (a * (-27.0 + (a * (a * (243.0 + (a * -729.0)))))));
    	}
    	return tmp;
    }
    
    def code(a, rand):
    	tmp = 0
    	if rand <= -6.8e+133:
    		tmp = ((a * (a * a)) + -0.037037037037037035) * (a * -27.0)
    	elif rand <= 7e+111:
    		tmp = a + -0.3333333333333333
    	else:
    		tmp = -0.037037037037037035 * (9.0 + (a * (-27.0 + (a * (a * (243.0 + (a * -729.0)))))))
    	return tmp
    
    function code(a, rand)
    	tmp = 0.0
    	if (rand <= -6.8e+133)
    		tmp = Float64(Float64(Float64(a * Float64(a * a)) + -0.037037037037037035) * Float64(a * -27.0));
    	elseif (rand <= 7e+111)
    		tmp = Float64(a + -0.3333333333333333);
    	else
    		tmp = Float64(-0.037037037037037035 * Float64(9.0 + Float64(a * Float64(-27.0 + Float64(a * Float64(a * Float64(243.0 + Float64(a * -729.0))))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, rand)
    	tmp = 0.0;
    	if (rand <= -6.8e+133)
    		tmp = ((a * (a * a)) + -0.037037037037037035) * (a * -27.0);
    	elseif (rand <= 7e+111)
    		tmp = a + -0.3333333333333333;
    	else
    		tmp = -0.037037037037037035 * (9.0 + (a * (-27.0 + (a * (a * (243.0 + (a * -729.0)))))));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, rand_] := If[LessEqual[rand, -6.8e+133], N[(N[(N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision] + -0.037037037037037035), $MachinePrecision] * N[(a * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 7e+111], N[(a + -0.3333333333333333), $MachinePrecision], N[(-0.037037037037037035 * N[(9.0 + N[(a * N[(-27.0 + N[(a * N[(a * N[(243.0 + N[(a * -729.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;rand \leq -6.8 \cdot 10^{+133}:\\
    \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(a \cdot -27\right)\\
    
    \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\
    \;\;\;\;a + -0.3333333333333333\\
    
    \mathbf{else}:\\
    \;\;\;\;-0.037037037037037035 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot \left(243 + a \cdot -729\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if rand < -6.79999999999999975e133

      1. Initial program 99.6%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval99.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified99.7%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f640.4%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified0.4%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
      8. Step-by-step derivation
        1. flip3-+N/A

          \[\leadsto \frac{{\frac{-1}{3}}^{3} + {a}^{3}}{\color{blue}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        2. div-invN/A

          \[\leadsto \left({\frac{-1}{3}}^{3} + {a}^{3}\right) \cdot \color{blue}{\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\frac{-1}{3}}^{3} + {a}^{3}\right), \color{blue}{\left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)}\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left({a}^{3} + {\frac{-1}{3}}^{3}\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left({a}^{3}\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        6. cube-multN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(a \cdot \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \color{blue}{\left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(\color{blue}{a \cdot a} - \frac{-1}{3} \cdot a\right)\right)\right)\right) \]
        13. distribute-rgt-out--N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(a \cdot \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        15. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \frac{1}{3}\right)\right)\right)\right)\right) \]
        17. +-lowering-+.f640.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right) \]
      9. Applied egg-rr0.2%

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \frac{1}{0.1111111111111111 + a \cdot \left(a + 0.3333333333333333\right)}} \]
      10. Taylor expanded in a around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(9 + -27 \cdot a\right)}\right) \]
      11. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \color{blue}{\left(-27 \cdot a\right)}\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \left(a \cdot \color{blue}{-27}\right)\right)\right) \]
        3. *-lowering-*.f6438.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \color{blue}{-27}\right)\right)\right) \]
      12. Simplified38.7%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(9 + a \cdot -27\right)} \]
      13. Taylor expanded in a around inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(-27 \cdot a\right)}\right) \]
      14. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(a \cdot \color{blue}{-27}\right)\right) \]
        2. *-lowering-*.f6438.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{*.f64}\left(a, \color{blue}{-27}\right)\right) \]
      15. Simplified38.7%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(a \cdot -27\right)} \]

      if -6.79999999999999975e133 < rand < 7.0000000000000004e111

      1. Initial program 99.9%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval100.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f6488.4%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified88.4%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]

      if 7.0000000000000004e111 < rand

      1. Initial program 99.5%

        \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
      2. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        8. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
        11. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
        16. metadata-eval99.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
      3. Simplified99.7%

        \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in rand around 0

        \[\leadsto \color{blue}{a - \frac{1}{3}} \]
      6. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
        2. metadata-evalN/A

          \[\leadsto a + \frac{-1}{3} \]
        3. +-commutativeN/A

          \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
        4. +-lowering-+.f646.3%

          \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
      7. Simplified6.3%

        \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
      8. Step-by-step derivation
        1. flip3-+N/A

          \[\leadsto \frac{{\frac{-1}{3}}^{3} + {a}^{3}}{\color{blue}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        2. div-invN/A

          \[\leadsto \left({\frac{-1}{3}}^{3} + {a}^{3}\right) \cdot \color{blue}{\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\frac{-1}{3}}^{3} + {a}^{3}\right), \color{blue}{\left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)}\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left({a}^{3} + {\frac{-1}{3}}^{3}\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left({a}^{3}\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        6. cube-multN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(a \cdot \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \color{blue}{\left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(\color{blue}{a \cdot a} - \frac{-1}{3} \cdot a\right)\right)\right)\right) \]
        13. distribute-rgt-out--N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(a \cdot \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
        15. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \frac{1}{3}\right)\right)\right)\right)\right) \]
        17. +-lowering-+.f643.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right) \]
      9. Applied egg-rr3.2%

        \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \frac{1}{0.1111111111111111 + a \cdot \left(a + 0.3333333333333333\right)}} \]
      10. Taylor expanded in a around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(9 + a \cdot \left({a}^{2} \cdot \left(243 + -729 \cdot a\right) - 27\right)\right)}\right) \]
      11. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \color{blue}{\left(a \cdot \left({a}^{2} \cdot \left(243 + -729 \cdot a\right) - 27\right)\right)}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \color{blue}{\left({a}^{2} \cdot \left(243 + -729 \cdot a\right) - 27\right)}\right)\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left({a}^{2} \cdot \left(243 + -729 \cdot a\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right)}\right)\right)\right)\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left({a}^{2} \cdot \left(243 + -729 \cdot a\right) + -27\right)\right)\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \left(-27 + \color{blue}{{a}^{2} \cdot \left(243 + -729 \cdot a\right)}\right)\right)\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \color{blue}{\left({a}^{2} \cdot \left(243 + -729 \cdot a\right)\right)}\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left(\left(a \cdot a\right) \cdot \left(\color{blue}{243} + -729 \cdot a\right)\right)\right)\right)\right)\right) \]
        8. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \left(a \cdot \color{blue}{\left(a \cdot \left(243 + -729 \cdot a\right)\right)}\right)\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \color{blue}{\left(a \cdot \left(243 + -729 \cdot a\right)\right)}\right)\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left(243 + -729 \cdot a\right)}\right)\right)\right)\right)\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(243, \color{blue}{\left(-729 \cdot a\right)}\right)\right)\right)\right)\right)\right)\right) \]
        12. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(243, \left(a \cdot \color{blue}{-729}\right)\right)\right)\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f640.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(243, \mathsf{*.f64}\left(a, \color{blue}{-729}\right)\right)\right)\right)\right)\right)\right)\right) \]
      12. Simplified0.2%

        \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot \left(243 + a \cdot -729\right)\right)\right)\right)} \]
      13. Taylor expanded in a around 0

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{\frac{-1}{27}}, \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(-27, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(243, \mathsf{*.f64}\left(a, -729\right)\right)\right)\right)\right)\right)\right)\right) \]
      14. Step-by-step derivation
        1. Simplified34.8%

          \[\leadsto \color{blue}{-0.037037037037037035} \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot \left(243 + a \cdot -729\right)\right)\right)\right) \]
      15. Recombined 3 regimes into one program.
      16. Final simplification75.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -6.8 \cdot 10^{+133}:\\ \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(a \cdot -27\right)\\ \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;-0.037037037037037035 \cdot \left(9 + a \cdot \left(-27 + a \cdot \left(a \cdot \left(243 + a \cdot -729\right)\right)\right)\right)\\ \end{array} \]
      17. Add Preprocessing

      Alternative 15: 73.7% accurate, 7.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;rand \leq -4 \cdot 10^{+129}:\\ \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(a \cdot -27\right)\\ \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{0.1111111111111111 - a \cdot a}{-0.3333333333333333}\\ \end{array} \end{array} \]
      (FPCore (a rand)
       :precision binary64
       (if (<= rand -4e+129)
         (* (+ (* a (* a a)) -0.037037037037037035) (* a -27.0))
         (if (<= rand 7e+111)
           (+ a -0.3333333333333333)
           (/ (- 0.1111111111111111 (* a a)) -0.3333333333333333))))
      double code(double a, double rand) {
      	double tmp;
      	if (rand <= -4e+129) {
      		tmp = ((a * (a * a)) + -0.037037037037037035) * (a * -27.0);
      	} else if (rand <= 7e+111) {
      		tmp = a + -0.3333333333333333;
      	} else {
      		tmp = (0.1111111111111111 - (a * a)) / -0.3333333333333333;
      	}
      	return tmp;
      }
      
      real(8) function code(a, rand)
          real(8), intent (in) :: a
          real(8), intent (in) :: rand
          real(8) :: tmp
          if (rand <= (-4d+129)) then
              tmp = ((a * (a * a)) + (-0.037037037037037035d0)) * (a * (-27.0d0))
          else if (rand <= 7d+111) then
              tmp = a + (-0.3333333333333333d0)
          else
              tmp = (0.1111111111111111d0 - (a * a)) / (-0.3333333333333333d0)
          end if
          code = tmp
      end function
      
      public static double code(double a, double rand) {
      	double tmp;
      	if (rand <= -4e+129) {
      		tmp = ((a * (a * a)) + -0.037037037037037035) * (a * -27.0);
      	} else if (rand <= 7e+111) {
      		tmp = a + -0.3333333333333333;
      	} else {
      		tmp = (0.1111111111111111 - (a * a)) / -0.3333333333333333;
      	}
      	return tmp;
      }
      
      def code(a, rand):
      	tmp = 0
      	if rand <= -4e+129:
      		tmp = ((a * (a * a)) + -0.037037037037037035) * (a * -27.0)
      	elif rand <= 7e+111:
      		tmp = a + -0.3333333333333333
      	else:
      		tmp = (0.1111111111111111 - (a * a)) / -0.3333333333333333
      	return tmp
      
      function code(a, rand)
      	tmp = 0.0
      	if (rand <= -4e+129)
      		tmp = Float64(Float64(Float64(a * Float64(a * a)) + -0.037037037037037035) * Float64(a * -27.0));
      	elseif (rand <= 7e+111)
      		tmp = Float64(a + -0.3333333333333333);
      	else
      		tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) / -0.3333333333333333);
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, rand)
      	tmp = 0.0;
      	if (rand <= -4e+129)
      		tmp = ((a * (a * a)) + -0.037037037037037035) * (a * -27.0);
      	elseif (rand <= 7e+111)
      		tmp = a + -0.3333333333333333;
      	else
      		tmp = (0.1111111111111111 - (a * a)) / -0.3333333333333333;
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, rand_] := If[LessEqual[rand, -4e+129], N[(N[(N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision] + -0.037037037037037035), $MachinePrecision] * N[(a * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[rand, 7e+111], N[(a + -0.3333333333333333), $MachinePrecision], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] / -0.3333333333333333), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;rand \leq -4 \cdot 10^{+129}:\\
      \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(a \cdot -27\right)\\
      
      \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\
      \;\;\;\;a + -0.3333333333333333\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{0.1111111111111111 - a \cdot a}{-0.3333333333333333}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if rand < -4e129

        1. Initial program 99.6%

          \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
        2. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
          2. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          3. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          5. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
          7. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
          8. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
          10. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
          13. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          15. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          16. metadata-eval99.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
        3. Simplified99.7%

          \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in rand around 0

          \[\leadsto \color{blue}{a - \frac{1}{3}} \]
        6. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
          2. metadata-evalN/A

            \[\leadsto a + \frac{-1}{3} \]
          3. +-commutativeN/A

            \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
          4. +-lowering-+.f640.4%

            \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
        7. Simplified0.4%

          \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
        8. Step-by-step derivation
          1. flip3-+N/A

            \[\leadsto \frac{{\frac{-1}{3}}^{3} + {a}^{3}}{\color{blue}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
          2. div-invN/A

            \[\leadsto \left({\frac{-1}{3}}^{3} + {a}^{3}\right) \cdot \color{blue}{\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left({\frac{-1}{3}}^{3} + {a}^{3}\right), \color{blue}{\left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)}\right) \]
          4. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\left({a}^{3} + {\frac{-1}{3}}^{3}\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left({a}^{3}\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{\color{blue}{1}}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
          6. cube-multN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(a \cdot \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \left(a \cdot a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \left({\frac{-1}{3}}^{3}\right)\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
          9. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(\frac{1}{\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{-1}{3} \cdot \frac{-1}{3} + \left(a \cdot a - \frac{-1}{3} \cdot a\right)\right)}\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \color{blue}{\left(a \cdot a - \frac{-1}{3} \cdot a\right)}\right)\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(\color{blue}{a \cdot a} - \frac{-1}{3} \cdot a\right)\right)\right)\right) \]
          13. distribute-rgt-out--N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \left(a \cdot \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
          14. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \color{blue}{\left(a - \frac{-1}{3}\right)}\right)\right)\right)\right) \]
          15. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{3}\right)\right)}\right)\right)\right)\right)\right) \]
          16. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \left(a + \frac{1}{3}\right)\right)\right)\right)\right) \]
          17. +-lowering-+.f640.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(a, \color{blue}{\frac{1}{3}}\right)\right)\right)\right)\right) \]
        9. Applied egg-rr0.2%

          \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \frac{1}{0.1111111111111111 + a \cdot \left(a + 0.3333333333333333\right)}} \]
        10. Taylor expanded in a around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(9 + -27 \cdot a\right)}\right) \]
        11. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \color{blue}{\left(-27 \cdot a\right)}\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \left(a \cdot \color{blue}{-27}\right)\right)\right) \]
          3. *-lowering-*.f6438.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{+.f64}\left(9, \mathsf{*.f64}\left(a, \color{blue}{-27}\right)\right)\right) \]
        12. Simplified38.7%

          \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(9 + a \cdot -27\right)} \]
        13. Taylor expanded in a around inf

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \color{blue}{\left(-27 \cdot a\right)}\right) \]
        14. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \left(a \cdot \color{blue}{-27}\right)\right) \]
          2. *-lowering-*.f6438.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, a\right)\right), \frac{-1}{27}\right), \mathsf{*.f64}\left(a, \color{blue}{-27}\right)\right) \]
        15. Simplified38.7%

          \[\leadsto \left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \color{blue}{\left(a \cdot -27\right)} \]

        if -4e129 < rand < 7.0000000000000004e111

        1. Initial program 99.9%

          \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
        2. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
          2. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          3. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          5. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
          7. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
          8. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
          10. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
          13. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          15. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          16. metadata-eval100.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
        3. Simplified100.0%

          \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in rand around 0

          \[\leadsto \color{blue}{a - \frac{1}{3}} \]
        6. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
          2. metadata-evalN/A

            \[\leadsto a + \frac{-1}{3} \]
          3. +-commutativeN/A

            \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
          4. +-lowering-+.f6488.4%

            \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
        7. Simplified88.4%

          \[\leadsto \color{blue}{-0.3333333333333333 + a} \]

        if 7.0000000000000004e111 < rand

        1. Initial program 99.5%

          \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
        2. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
          2. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          3. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          5. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
          7. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
          8. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
          10. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
          13. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          15. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
          16. metadata-eval99.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
        3. Simplified99.7%

          \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in rand around 0

          \[\leadsto \color{blue}{a - \frac{1}{3}} \]
        6. Step-by-step derivation
          1. sub-negN/A

            \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
          2. metadata-evalN/A

            \[\leadsto a + \frac{-1}{3} \]
          3. +-commutativeN/A

            \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
          4. +-lowering-+.f646.3%

            \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
        7. Simplified6.3%

          \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
        8. Step-by-step derivation
          1. flip-+N/A

            \[\leadsto \frac{\frac{-1}{3} \cdot \frac{-1}{3} - a \cdot a}{\color{blue}{\frac{-1}{3} - a}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3} - a \cdot a\right), \color{blue}{\left(\frac{-1}{3} - a\right)}\right) \]
          3. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \left(a \cdot a\right)\right), \left(\color{blue}{\frac{-1}{3}} - a\right)\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{1}{9}, \left(a \cdot a\right)\right), \left(\frac{-1}{3} - a\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, a\right)\right), \left(\frac{-1}{3} - a\right)\right) \]
          6. --lowering--.f6433.4%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{\_.f64}\left(\frac{-1}{3}, \color{blue}{a}\right)\right) \]
        9. Applied egg-rr33.4%

          \[\leadsto \color{blue}{\frac{0.1111111111111111 - a \cdot a}{-0.3333333333333333 - a}} \]
        10. Taylor expanded in a around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, a\right)\right), \color{blue}{\frac{-1}{3}}\right) \]
        11. Step-by-step derivation
          1. Simplified34.6%

            \[\leadsto \frac{0.1111111111111111 - a \cdot a}{\color{blue}{-0.3333333333333333}} \]
        12. Recombined 3 regimes into one program.
        13. Final simplification75.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq -4 \cdot 10^{+129}:\\ \;\;\;\;\left(a \cdot \left(a \cdot a\right) + -0.037037037037037035\right) \cdot \left(a \cdot -27\right)\\ \mathbf{elif}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{0.1111111111111111 - a \cdot a}{-0.3333333333333333}\\ \end{array} \]
        14. Add Preprocessing

        Alternative 16: 67.7% accurate, 9.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{0.1111111111111111 - a \cdot a}{-0.3333333333333333}\\ \end{array} \end{array} \]
        (FPCore (a rand)
         :precision binary64
         (if (<= rand 7e+111)
           (+ a -0.3333333333333333)
           (/ (- 0.1111111111111111 (* a a)) -0.3333333333333333)))
        double code(double a, double rand) {
        	double tmp;
        	if (rand <= 7e+111) {
        		tmp = a + -0.3333333333333333;
        	} else {
        		tmp = (0.1111111111111111 - (a * a)) / -0.3333333333333333;
        	}
        	return tmp;
        }
        
        real(8) function code(a, rand)
            real(8), intent (in) :: a
            real(8), intent (in) :: rand
            real(8) :: tmp
            if (rand <= 7d+111) then
                tmp = a + (-0.3333333333333333d0)
            else
                tmp = (0.1111111111111111d0 - (a * a)) / (-0.3333333333333333d0)
            end if
            code = tmp
        end function
        
        public static double code(double a, double rand) {
        	double tmp;
        	if (rand <= 7e+111) {
        		tmp = a + -0.3333333333333333;
        	} else {
        		tmp = (0.1111111111111111 - (a * a)) / -0.3333333333333333;
        	}
        	return tmp;
        }
        
        def code(a, rand):
        	tmp = 0
        	if rand <= 7e+111:
        		tmp = a + -0.3333333333333333
        	else:
        		tmp = (0.1111111111111111 - (a * a)) / -0.3333333333333333
        	return tmp
        
        function code(a, rand)
        	tmp = 0.0
        	if (rand <= 7e+111)
        		tmp = Float64(a + -0.3333333333333333);
        	else
        		tmp = Float64(Float64(0.1111111111111111 - Float64(a * a)) / -0.3333333333333333);
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, rand)
        	tmp = 0.0;
        	if (rand <= 7e+111)
        		tmp = a + -0.3333333333333333;
        	else
        		tmp = (0.1111111111111111 - (a * a)) / -0.3333333333333333;
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, rand_] := If[LessEqual[rand, 7e+111], N[(a + -0.3333333333333333), $MachinePrecision], N[(N[(0.1111111111111111 - N[(a * a), $MachinePrecision]), $MachinePrecision] / -0.3333333333333333), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;rand \leq 7 \cdot 10^{+111}:\\
        \;\;\;\;a + -0.3333333333333333\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{0.1111111111111111 - a \cdot a}{-0.3333333333333333}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if rand < 7.0000000000000004e111

          1. Initial program 99.9%

            \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
          2. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
            2. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
            7. associate-*l/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
            8. *-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
            10. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
            11. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
            13. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            14. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            15. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            16. metadata-eval99.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
          3. Simplified99.9%

            \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
          4. Add Preprocessing
          5. Taylor expanded in rand around 0

            \[\leadsto \color{blue}{a - \frac{1}{3}} \]
          6. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
            2. metadata-evalN/A

              \[\leadsto a + \frac{-1}{3} \]
            3. +-commutativeN/A

              \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
            4. +-lowering-+.f6474.5%

              \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
          7. Simplified74.5%

            \[\leadsto \color{blue}{-0.3333333333333333 + a} \]

          if 7.0000000000000004e111 < rand

          1. Initial program 99.5%

            \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
          2. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
            2. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
            7. associate-*l/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
            8. *-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
            10. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
            11. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
            13. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            14. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            15. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            16. metadata-eval99.7%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
          3. Simplified99.7%

            \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
          4. Add Preprocessing
          5. Taylor expanded in rand around 0

            \[\leadsto \color{blue}{a - \frac{1}{3}} \]
          6. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
            2. metadata-evalN/A

              \[\leadsto a + \frac{-1}{3} \]
            3. +-commutativeN/A

              \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
            4. +-lowering-+.f646.3%

              \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
          7. Simplified6.3%

            \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
          8. Step-by-step derivation
            1. flip-+N/A

              \[\leadsto \frac{\frac{-1}{3} \cdot \frac{-1}{3} - a \cdot a}{\color{blue}{\frac{-1}{3} - a}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3} - a \cdot a\right), \color{blue}{\left(\frac{-1}{3} - a\right)}\right) \]
            3. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\frac{-1}{3} \cdot \frac{-1}{3}\right), \left(a \cdot a\right)\right), \left(\color{blue}{\frac{-1}{3}} - a\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{1}{9}, \left(a \cdot a\right)\right), \left(\frac{-1}{3} - a\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, a\right)\right), \left(\frac{-1}{3} - a\right)\right) \]
            6. --lowering--.f6433.4%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{\_.f64}\left(\frac{-1}{3}, \color{blue}{a}\right)\right) \]
          9. Applied egg-rr33.4%

            \[\leadsto \color{blue}{\frac{0.1111111111111111 - a \cdot a}{-0.3333333333333333 - a}} \]
          10. Taylor expanded in a around 0

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\frac{1}{9}, \mathsf{*.f64}\left(a, a\right)\right), \color{blue}{\frac{-1}{3}}\right) \]
          11. Step-by-step derivation
            1. Simplified34.6%

              \[\leadsto \frac{0.1111111111111111 - a \cdot a}{\color{blue}{-0.3333333333333333}} \]
          12. Recombined 2 regimes into one program.
          13. Final simplification70.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;rand \leq 7 \cdot 10^{+111}:\\ \;\;\;\;a + -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{0.1111111111111111 - a \cdot a}{-0.3333333333333333}\\ \end{array} \]
          14. Add Preprocessing

          Alternative 17: 63.9% accurate, 39.7× speedup?

          \[\begin{array}{l} \\ a + -0.3333333333333333 \end{array} \]
          (FPCore (a rand) :precision binary64 (+ a -0.3333333333333333))
          double code(double a, double rand) {
          	return a + -0.3333333333333333;
          }
          
          real(8) function code(a, rand)
              real(8), intent (in) :: a
              real(8), intent (in) :: rand
              code = a + (-0.3333333333333333d0)
          end function
          
          public static double code(double a, double rand) {
          	return a + -0.3333333333333333;
          }
          
          def code(a, rand):
          	return a + -0.3333333333333333
          
          function code(a, rand)
          	return Float64(a + -0.3333333333333333)
          end
          
          function tmp = code(a, rand)
          	tmp = a + -0.3333333333333333;
          end
          
          code[a_, rand_] := N[(a + -0.3333333333333333), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          a + -0.3333333333333333
          \end{array}
          
          Derivation
          1. Initial program 99.8%

            \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
          2. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
            2. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
            7. associate-*l/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
            8. *-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
            10. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
            11. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
            13. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            14. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            15. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            16. metadata-eval99.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
          3. Simplified99.9%

            \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
          4. Add Preprocessing
          5. Taylor expanded in rand around 0

            \[\leadsto \color{blue}{a - \frac{1}{3}} \]
          6. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
            2. metadata-evalN/A

              \[\leadsto a + \frac{-1}{3} \]
            3. +-commutativeN/A

              \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
            4. +-lowering-+.f6467.3%

              \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
          7. Simplified67.3%

            \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
          8. Final simplification67.3%

            \[\leadsto a + -0.3333333333333333 \]
          9. Add Preprocessing

          Alternative 18: 62.8% accurate, 119.0× speedup?

          \[\begin{array}{l} \\ a \end{array} \]
          (FPCore (a rand) :precision binary64 a)
          double code(double a, double rand) {
          	return a;
          }
          
          real(8) function code(a, rand)
              real(8), intent (in) :: a
              real(8), intent (in) :: rand
              code = a
          end function
          
          public static double code(double a, double rand) {
          	return a;
          }
          
          def code(a, rand):
          	return a
          
          function code(a, rand)
          	return a
          end
          
          function tmp = code(a, rand)
          	tmp = a;
          end
          
          code[a_, rand_] := a
          
          \begin{array}{l}
          
          \\
          a
          \end{array}
          
          Derivation
          1. Initial program 99.8%

            \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
          2. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
            2. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            4. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
            6. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
            7. associate-*l/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
            8. *-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
            10. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
            11. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
            13. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            14. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            15. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
            16. metadata-eval99.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
          3. Simplified99.9%

            \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
          4. Add Preprocessing
          5. Taylor expanded in rand around 0

            \[\leadsto \color{blue}{a - \frac{1}{3}} \]
          6. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
            2. metadata-evalN/A

              \[\leadsto a + \frac{-1}{3} \]
            3. +-commutativeN/A

              \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
            4. +-lowering-+.f6467.3%

              \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
          7. Simplified67.3%

            \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
          8. Taylor expanded in a around inf

            \[\leadsto \color{blue}{a} \]
          9. Step-by-step derivation
            1. Simplified66.4%

              \[\leadsto \color{blue}{a} \]
            2. Add Preprocessing

            Alternative 19: 1.5% accurate, 119.0× speedup?

            \[\begin{array}{l} \\ -0.3333333333333333 \end{array} \]
            (FPCore (a rand) :precision binary64 -0.3333333333333333)
            double code(double a, double rand) {
            	return -0.3333333333333333;
            }
            
            real(8) function code(a, rand)
                real(8), intent (in) :: a
                real(8), intent (in) :: rand
                code = -0.3333333333333333d0
            end function
            
            public static double code(double a, double rand) {
            	return -0.3333333333333333;
            }
            
            def code(a, rand):
            	return -0.3333333333333333
            
            function code(a, rand)
            	return -0.3333333333333333
            end
            
            function tmp = code(a, rand)
            	tmp = -0.3333333333333333;
            end
            
            code[a_, rand_] := -0.3333333333333333
            
            \begin{array}{l}
            
            \\
            -0.3333333333333333
            \end{array}
            
            Derivation
            1. Initial program 99.8%

              \[\left(a - \frac{1}{3}\right) \cdot \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right) \]
            2. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), \color{blue}{\left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right) \]
              2. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(\color{blue}{1} + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
              4. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
              5. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \left(1 + \frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)\right) \]
              6. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}} \cdot rand\right)}\right)\right) \]
              7. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{1 \cdot rand}{\color{blue}{\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
              8. *-lft-identityN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \left(\frac{rand}{\sqrt{\color{blue}{9 \cdot \left(a - \frac{1}{3}\right)}}}\right)\right)\right) \]
              9. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \color{blue}{\left(\sqrt{9 \cdot \left(a - \frac{1}{3}\right)}\right)}\right)\right)\right) \]
              10. sqrt-lowering-sqrt.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(9 \cdot \left(a - \frac{1}{3}\right)\right)\right)\right)\right)\right) \]
              11. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\left(\left(a - \frac{1}{3}\right) \cdot 9\right)\right)\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a - \frac{1}{3}\right), 9\right)\right)\right)\right)\right) \]
              13. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(a + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
              14. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
              15. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)\right), 9\right)\right)\right)\right)\right) \]
              16. metadata-eval99.9%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(rand, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \frac{-1}{3}\right), 9\right)\right)\right)\right)\right) \]
            3. Simplified99.9%

              \[\leadsto \color{blue}{\left(a + -0.3333333333333333\right) \cdot \left(1 + \frac{rand}{\sqrt{\left(a + -0.3333333333333333\right) \cdot 9}}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in rand around 0

              \[\leadsto \color{blue}{a - \frac{1}{3}} \]
            6. Step-by-step derivation
              1. sub-negN/A

                \[\leadsto a + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \]
              2. metadata-evalN/A

                \[\leadsto a + \frac{-1}{3} \]
              3. +-commutativeN/A

                \[\leadsto \frac{-1}{3} + \color{blue}{a} \]
              4. +-lowering-+.f6467.3%

                \[\leadsto \mathsf{+.f64}\left(\frac{-1}{3}, \color{blue}{a}\right) \]
            7. Simplified67.3%

              \[\leadsto \color{blue}{-0.3333333333333333 + a} \]
            8. Taylor expanded in a around 0

              \[\leadsto \color{blue}{\frac{-1}{3}} \]
            9. Step-by-step derivation
              1. Simplified1.5%

                \[\leadsto \color{blue}{-0.3333333333333333} \]
              2. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2024163 
              (FPCore (a rand)
                :name "Octave 3.8, oct_fill_randg"
                :precision binary64
                (* (- a (/ 1.0 3.0)) (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 (- a (/ 1.0 3.0))))) rand))))