(/ -1 (- (- -1 z0) (/ (sqrt (- (- 1 z1) z1)) (* (* 3544907808303833/2000000000000000 z1) (exp (* z1 z1))))))

Percentage Accurate: 99.8% → 99.8%
Time: 2.8s
Alternatives: 9
Speedup: 1.0×

Specification

?
\[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
(FPCore (z0 z1)
  :precision binary64
  (/
 -1.0
 (-
  (- -1.0 z0)
  (/
   (sqrt (- (- 1.0 z1) z1))
   (* (* 1.7724539041519165 z1) (exp (* z1 z1)))))))
double code(double z0, double z1) {
	return -1.0 / ((-1.0 - z0) - (sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * exp((z1 * z1)))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(z0, z1)
use fmin_fmax_functions
    real(8), intent (in) :: z0
    real(8), intent (in) :: z1
    code = (-1.0d0) / (((-1.0d0) - z0) - (sqrt(((1.0d0 - z1) - z1)) / ((1.7724539041519165d0 * z1) * exp((z1 * z1)))))
end function
public static double code(double z0, double z1) {
	return -1.0 / ((-1.0 - z0) - (Math.sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * Math.exp((z1 * z1)))));
}
def code(z0, z1):
	return -1.0 / ((-1.0 - z0) - (math.sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * math.exp((z1 * z1)))))
function code(z0, z1)
	return Float64(-1.0 / Float64(Float64(-1.0 - z0) - Float64(sqrt(Float64(Float64(1.0 - z1) - z1)) / Float64(Float64(1.7724539041519165 * z1) * exp(Float64(z1 * z1))))))
end
function tmp = code(z0, z1)
	tmp = -1.0 / ((-1.0 - z0) - (sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * exp((z1 * z1)))));
end
code[z0_, z1_] := N[(-1.0 / N[(N[(-1.0 - z0), $MachinePrecision] - N[(N[Sqrt[N[(N[(1.0 - z1), $MachinePrecision] - z1), $MachinePrecision]], $MachinePrecision] / N[(N[(1.7724539041519165 * z1), $MachinePrecision] * N[Exp[N[(z1 * z1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}}

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 9 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.8% accurate, 1.0× speedup?

\[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
(FPCore (z0 z1)
  :precision binary64
  (/
 -1.0
 (-
  (- -1.0 z0)
  (/
   (sqrt (- (- 1.0 z1) z1))
   (* (* 1.7724539041519165 z1) (exp (* z1 z1)))))))
double code(double z0, double z1) {
	return -1.0 / ((-1.0 - z0) - (sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * exp((z1 * z1)))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(z0, z1)
use fmin_fmax_functions
    real(8), intent (in) :: z0
    real(8), intent (in) :: z1
    code = (-1.0d0) / (((-1.0d0) - z0) - (sqrt(((1.0d0 - z1) - z1)) / ((1.7724539041519165d0 * z1) * exp((z1 * z1)))))
end function
public static double code(double z0, double z1) {
	return -1.0 / ((-1.0 - z0) - (Math.sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * Math.exp((z1 * z1)))));
}
def code(z0, z1):
	return -1.0 / ((-1.0 - z0) - (math.sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * math.exp((z1 * z1)))))
function code(z0, z1)
	return Float64(-1.0 / Float64(Float64(-1.0 - z0) - Float64(sqrt(Float64(Float64(1.0 - z1) - z1)) / Float64(Float64(1.7724539041519165 * z1) * exp(Float64(z1 * z1))))))
end
function tmp = code(z0, z1)
	tmp = -1.0 / ((-1.0 - z0) - (sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * exp((z1 * z1)))));
end
code[z0_, z1_] := N[(-1.0 / N[(N[(-1.0 - z0), $MachinePrecision] - N[(N[Sqrt[N[(N[(1.0 - z1), $MachinePrecision] - z1), $MachinePrecision]], $MachinePrecision] / N[(N[(1.7724539041519165 * z1), $MachinePrecision] * N[Exp[N[(z1 * z1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}}

Alternative 1: 99.1% accurate, 1.0× speedup?

\[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
(FPCore (z0 z1)
  :precision binary64
  (/
 -1.0
 (-
  (- -1.0 z0)
  (/
   (sqrt (- 1.0 z1))
   (* (* 1.7724539041519165 z1) (exp (* z1 z1)))))))
double code(double z0, double z1) {
	return -1.0 / ((-1.0 - z0) - (sqrt((1.0 - z1)) / ((1.7724539041519165 * z1) * exp((z1 * z1)))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(z0, z1)
use fmin_fmax_functions
    real(8), intent (in) :: z0
    real(8), intent (in) :: z1
    code = (-1.0d0) / (((-1.0d0) - z0) - (sqrt((1.0d0 - z1)) / ((1.7724539041519165d0 * z1) * exp((z1 * z1)))))
end function
public static double code(double z0, double z1) {
	return -1.0 / ((-1.0 - z0) - (Math.sqrt((1.0 - z1)) / ((1.7724539041519165 * z1) * Math.exp((z1 * z1)))));
}
def code(z0, z1):
	return -1.0 / ((-1.0 - z0) - (math.sqrt((1.0 - z1)) / ((1.7724539041519165 * z1) * math.exp((z1 * z1)))))
function code(z0, z1)
	return Float64(-1.0 / Float64(Float64(-1.0 - z0) - Float64(sqrt(Float64(1.0 - z1)) / Float64(Float64(1.7724539041519165 * z1) * exp(Float64(z1 * z1))))))
end
function tmp = code(z0, z1)
	tmp = -1.0 / ((-1.0 - z0) - (sqrt((1.0 - z1)) / ((1.7724539041519165 * z1) * exp((z1 * z1)))));
end
code[z0_, z1_] := N[(-1.0 / N[(N[(-1.0 - z0), $MachinePrecision] - N[(N[Sqrt[N[(1.0 - z1), $MachinePrecision]], $MachinePrecision] / N[(N[(1.7724539041519165 * z1), $MachinePrecision] * N[Exp[N[(z1 * z1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}}
Derivation
  1. Initial program 99.8%

    \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
  2. Taylor expanded in z1 around 0

    \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\color{blue}{1} - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
  3. Step-by-step derivation
    1. Applied rewrites99.1%

      \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\color{blue}{1} - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
    2. Add Preprocessing

    Alternative 2: 98.9% accurate, 2.7× speedup?

    \[\frac{1}{\frac{\sqrt{1 - z1}}{\left(z1 \cdot z1 - -1\right) \cdot \left(1.7724539041519165 \cdot z1\right)} - \left(-1 - z0\right)} \]
    (FPCore (z0 z1)
      :precision binary64
      (/
     1.0
     (-
      (/
       (sqrt (- 1.0 z1))
       (* (- (* z1 z1) -1.0) (* 1.7724539041519165 z1)))
      (- -1.0 z0))))
    double code(double z0, double z1) {
    	return 1.0 / ((sqrt((1.0 - z1)) / (((z1 * z1) - -1.0) * (1.7724539041519165 * z1))) - (-1.0 - z0));
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(z0, z1)
    use fmin_fmax_functions
        real(8), intent (in) :: z0
        real(8), intent (in) :: z1
        code = 1.0d0 / ((sqrt((1.0d0 - z1)) / (((z1 * z1) - (-1.0d0)) * (1.7724539041519165d0 * z1))) - ((-1.0d0) - z0))
    end function
    
    public static double code(double z0, double z1) {
    	return 1.0 / ((Math.sqrt((1.0 - z1)) / (((z1 * z1) - -1.0) * (1.7724539041519165 * z1))) - (-1.0 - z0));
    }
    
    def code(z0, z1):
    	return 1.0 / ((math.sqrt((1.0 - z1)) / (((z1 * z1) - -1.0) * (1.7724539041519165 * z1))) - (-1.0 - z0))
    
    function code(z0, z1)
    	return Float64(1.0 / Float64(Float64(sqrt(Float64(1.0 - z1)) / Float64(Float64(Float64(z1 * z1) - -1.0) * Float64(1.7724539041519165 * z1))) - Float64(-1.0 - z0)))
    end
    
    function tmp = code(z0, z1)
    	tmp = 1.0 / ((sqrt((1.0 - z1)) / (((z1 * z1) - -1.0) * (1.7724539041519165 * z1))) - (-1.0 - z0));
    end
    
    code[z0_, z1_] := N[(1.0 / N[(N[(N[Sqrt[N[(1.0 - z1), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(z1 * z1), $MachinePrecision] - -1.0), $MachinePrecision] * N[(1.7724539041519165 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 - z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \frac{1}{\frac{\sqrt{1 - z1}}{\left(z1 \cdot z1 - -1\right) \cdot \left(1.7724539041519165 \cdot z1\right)} - \left(-1 - z0\right)}
    
    Derivation
    1. Initial program 99.8%

      \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
    2. Taylor expanded in z1 around 0

      \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\color{blue}{1} - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
    3. Step-by-step derivation
      1. Applied rewrites99.1%

        \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\color{blue}{1} - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
      2. Taylor expanded in z1 around 0

        \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot \color{blue}{\left(1 + {z1}^{2}\right)}}} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(\frac{3544907808303833}{2000000000000000} \cdot z1\right) \cdot \left(1 + \color{blue}{{z1}^{2}}\right)}} \]
        2. lower-pow.f6498.9%

          \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot \left(1 + {z1}^{\color{blue}{2}}\right)}} \]
      4. Applied rewrites98.9%

        \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot \color{blue}{\left(1 + {z1}^{2}\right)}}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(\frac{3544907808303833}{2000000000000000} \cdot z1\right) \cdot \left(1 + {z1}^{2}\right)}}} \]
        2. frac-2negN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\left(\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(\frac{3544907808303833}{2000000000000000} \cdot z1\right) \cdot \left(1 + {z1}^{2}\right)}\right)\right)}} \]
        3. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{1}}{\mathsf{neg}\left(\left(\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(\frac{3544907808303833}{2000000000000000} \cdot z1\right) \cdot \left(1 + {z1}^{2}\right)}\right)\right)} \]
        4. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\left(\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(\frac{3544907808303833}{2000000000000000} \cdot z1\right) \cdot \left(1 + {z1}^{2}\right)}\right)\right)}} \]
        5. lift--.f64N/A

          \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\left(\left(-1 - z0\right) - \frac{\sqrt{1 - z1}}{\left(\frac{3544907808303833}{2000000000000000} \cdot z1\right) \cdot \left(1 + {z1}^{2}\right)}\right)}\right)} \]
        6. sub-negate-revN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{1 - z1}}{\left(\frac{3544907808303833}{2000000000000000} \cdot z1\right) \cdot \left(1 + {z1}^{2}\right)} - \left(-1 - z0\right)}} \]
        7. lower--.f6498.9%

          \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{1 - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot \left(1 + {z1}^{2}\right)} - \left(-1 - z0\right)}} \]
      6. Applied rewrites98.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{1 - z1}}{\left(z1 \cdot z1 - -1\right) \cdot \left(1.7724539041519165 \cdot z1\right)} - \left(-1 - z0\right)}} \]
      7. Add Preprocessing

      Alternative 3: 98.4% accurate, 5.5× speedup?

      \[\frac{-1}{\left(-1 - z0\right) - \frac{0.5641895665989011}{z1}} \]
      (FPCore (z0 z1)
        :precision binary64
        (/ -1.0 (- (- -1.0 z0) (/ 0.5641895665989011 z1))))
      double code(double z0, double z1) {
      	return -1.0 / ((-1.0 - z0) - (0.5641895665989011 / z1));
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(z0, z1)
      use fmin_fmax_functions
          real(8), intent (in) :: z0
          real(8), intent (in) :: z1
          code = (-1.0d0) / (((-1.0d0) - z0) - (0.5641895665989011d0 / z1))
      end function
      
      public static double code(double z0, double z1) {
      	return -1.0 / ((-1.0 - z0) - (0.5641895665989011 / z1));
      }
      
      def code(z0, z1):
      	return -1.0 / ((-1.0 - z0) - (0.5641895665989011 / z1))
      
      function code(z0, z1)
      	return Float64(-1.0 / Float64(Float64(-1.0 - z0) - Float64(0.5641895665989011 / z1)))
      end
      
      function tmp = code(z0, z1)
      	tmp = -1.0 / ((-1.0 - z0) - (0.5641895665989011 / z1));
      end
      
      code[z0_, z1_] := N[(-1.0 / N[(N[(-1.0 - z0), $MachinePrecision] - N[(0.5641895665989011 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \frac{-1}{\left(-1 - z0\right) - \frac{0.5641895665989011}{z1}}
      
      Derivation
      1. Initial program 99.8%

        \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
      2. Taylor expanded in z1 around 0

        \[\leadsto \frac{-1}{\left(-1 - z0\right) - \color{blue}{\frac{\frac{2000000000000000}{3544907808303833}}{z1}}} \]
      3. Step-by-step derivation
        1. lower-/.f6498.4%

          \[\leadsto \frac{-1}{\left(-1 - z0\right) - \frac{0.5641895665989011}{\color{blue}{z1}}} \]
      4. Applied rewrites98.4%

        \[\leadsto \frac{-1}{\left(-1 - z0\right) - \color{blue}{\frac{0.5641895665989011}{z1}}} \]
      5. Add Preprocessing

      Alternative 4: 83.2% accurate, 4.2× speedup?

      \[\begin{array}{l} \mathbf{if}\;z0 \leq -1 \cdot 10^{+31}:\\ \;\;\;\;\frac{1}{z0}\\ \mathbf{elif}\;z0 \leq 2.65 \cdot 10^{+73}:\\ \;\;\;\;\frac{-1}{-1 - \frac{0.5641895665989011}{z1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z0}\\ \end{array} \]
      (FPCore (z0 z1)
        :precision binary64
        (if (<= z0 -1e+31)
        (/ 1.0 z0)
        (if (<= z0 2.65e+73)
          (/ -1.0 (- -1.0 (/ 0.5641895665989011 z1)))
          (/ 1.0 z0))))
      double code(double z0, double z1) {
      	double tmp;
      	if (z0 <= -1e+31) {
      		tmp = 1.0 / z0;
      	} else if (z0 <= 2.65e+73) {
      		tmp = -1.0 / (-1.0 - (0.5641895665989011 / z1));
      	} else {
      		tmp = 1.0 / z0;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(z0, z1)
      use fmin_fmax_functions
          real(8), intent (in) :: z0
          real(8), intent (in) :: z1
          real(8) :: tmp
          if (z0 <= (-1d+31)) then
              tmp = 1.0d0 / z0
          else if (z0 <= 2.65d+73) then
              tmp = (-1.0d0) / ((-1.0d0) - (0.5641895665989011d0 / z1))
          else
              tmp = 1.0d0 / z0
          end if
          code = tmp
      end function
      
      public static double code(double z0, double z1) {
      	double tmp;
      	if (z0 <= -1e+31) {
      		tmp = 1.0 / z0;
      	} else if (z0 <= 2.65e+73) {
      		tmp = -1.0 / (-1.0 - (0.5641895665989011 / z1));
      	} else {
      		tmp = 1.0 / z0;
      	}
      	return tmp;
      }
      
      def code(z0, z1):
      	tmp = 0
      	if z0 <= -1e+31:
      		tmp = 1.0 / z0
      	elif z0 <= 2.65e+73:
      		tmp = -1.0 / (-1.0 - (0.5641895665989011 / z1))
      	else:
      		tmp = 1.0 / z0
      	return tmp
      
      function code(z0, z1)
      	tmp = 0.0
      	if (z0 <= -1e+31)
      		tmp = Float64(1.0 / z0);
      	elseif (z0 <= 2.65e+73)
      		tmp = Float64(-1.0 / Float64(-1.0 - Float64(0.5641895665989011 / z1)));
      	else
      		tmp = Float64(1.0 / z0);
      	end
      	return tmp
      end
      
      function tmp_2 = code(z0, z1)
      	tmp = 0.0;
      	if (z0 <= -1e+31)
      		tmp = 1.0 / z0;
      	elseif (z0 <= 2.65e+73)
      		tmp = -1.0 / (-1.0 - (0.5641895665989011 / z1));
      	else
      		tmp = 1.0 / z0;
      	end
      	tmp_2 = tmp;
      end
      
      code[z0_, z1_] := If[LessEqual[z0, -1e+31], N[(1.0 / z0), $MachinePrecision], If[LessEqual[z0, 2.65e+73], N[(-1.0 / N[(-1.0 - N[(0.5641895665989011 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / z0), $MachinePrecision]]]
      
      \begin{array}{l}
      \mathbf{if}\;z0 \leq -1 \cdot 10^{+31}:\\
      \;\;\;\;\frac{1}{z0}\\
      
      \mathbf{elif}\;z0 \leq 2.65 \cdot 10^{+73}:\\
      \;\;\;\;\frac{-1}{-1 - \frac{0.5641895665989011}{z1}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{z0}\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z0 < -9.9999999999999996e30 or 2.65e73 < z0

        1. Initial program 99.8%

          \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
        2. Taylor expanded in z0 around inf

          \[\leadsto \color{blue}{\frac{1}{z0}} \]
        3. Step-by-step derivation
          1. lower-/.f6434.9%

            \[\leadsto \frac{1}{\color{blue}{z0}} \]
        4. Applied rewrites34.9%

          \[\leadsto \color{blue}{\frac{1}{z0}} \]

        if -9.9999999999999996e30 < z0 < 2.65e73

        1. Initial program 99.8%

          \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
        2. Taylor expanded in z0 around 0

          \[\leadsto \frac{-1}{\color{blue}{-1} - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
        3. Step-by-step derivation
          1. Applied rewrites66.6%

            \[\leadsto \frac{-1}{\color{blue}{-1} - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
          2. Taylor expanded in z1 around 0

            \[\leadsto \frac{-1}{-1 - \color{blue}{\frac{\frac{2000000000000000}{3544907808303833} + \frac{-2000000000000000}{3544907808303833} \cdot z1}{z1}}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{-1}{-1 - \frac{\frac{2000000000000000}{3544907808303833} + \frac{-2000000000000000}{3544907808303833} \cdot z1}{\color{blue}{z1}}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{-1}{-1 - \frac{\frac{2000000000000000}{3544907808303833} + \frac{-2000000000000000}{3544907808303833} \cdot z1}{z1}} \]
            3. lower-*.f6453.2%

              \[\leadsto \frac{-1}{-1 - \frac{0.5641895665989011 + -0.5641895665989011 \cdot z1}{z1}} \]
          4. Applied rewrites53.2%

            \[\leadsto \frac{-1}{-1 - \color{blue}{\frac{0.5641895665989011 + -0.5641895665989011 \cdot z1}{z1}}} \]
          5. Taylor expanded in z1 around 0

            \[\leadsto \frac{-1}{-1 - \frac{\frac{2000000000000000}{3544907808303833}}{z1}} \]
          6. Step-by-step derivation
            1. Applied rewrites65.2%

              \[\leadsto \frac{-1}{-1 - \frac{0.5641895665989011}{z1}} \]
          7. Recombined 2 regimes into one program.
          8. Add Preprocessing

          Alternative 5: 63.7% accurate, 0.5× speedup?

          \[\begin{array}{l} t_0 := \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+43}:\\ \;\;\;\;z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z0 \cdot z1\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+153}:\\ \;\;\;\;\frac{1}{z0}\\ \mathbf{else}:\\ \;\;\;\;z1 \cdot 1.7724539041519165\\ \end{array} \]
          (FPCore (z0 z1)
            :precision binary64
            (let* ((t_0
                  (/
                   (sqrt (- (- 1.0 z1) z1))
                   (* (* 1.7724539041519165 z1) (exp (* z1 z1))))))
            (if (<= t_0 -5e+43)
              (* z1 (+ 1.7724539041519165 (* -3.141592842343371 (* z0 z1))))
              (if (<= t_0 2e+153) (/ 1.0 z0) (* z1 1.7724539041519165)))))
          double code(double z0, double z1) {
          	double t_0 = sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * exp((z1 * z1)));
          	double tmp;
          	if (t_0 <= -5e+43) {
          		tmp = z1 * (1.7724539041519165 + (-3.141592842343371 * (z0 * z1)));
          	} else if (t_0 <= 2e+153) {
          		tmp = 1.0 / z0;
          	} else {
          		tmp = z1 * 1.7724539041519165;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(z0, z1)
          use fmin_fmax_functions
              real(8), intent (in) :: z0
              real(8), intent (in) :: z1
              real(8) :: t_0
              real(8) :: tmp
              t_0 = sqrt(((1.0d0 - z1) - z1)) / ((1.7724539041519165d0 * z1) * exp((z1 * z1)))
              if (t_0 <= (-5d+43)) then
                  tmp = z1 * (1.7724539041519165d0 + ((-3.141592842343371d0) * (z0 * z1)))
              else if (t_0 <= 2d+153) then
                  tmp = 1.0d0 / z0
              else
                  tmp = z1 * 1.7724539041519165d0
              end if
              code = tmp
          end function
          
          public static double code(double z0, double z1) {
          	double t_0 = Math.sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * Math.exp((z1 * z1)));
          	double tmp;
          	if (t_0 <= -5e+43) {
          		tmp = z1 * (1.7724539041519165 + (-3.141592842343371 * (z0 * z1)));
          	} else if (t_0 <= 2e+153) {
          		tmp = 1.0 / z0;
          	} else {
          		tmp = z1 * 1.7724539041519165;
          	}
          	return tmp;
          }
          
          def code(z0, z1):
          	t_0 = math.sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * math.exp((z1 * z1)))
          	tmp = 0
          	if t_0 <= -5e+43:
          		tmp = z1 * (1.7724539041519165 + (-3.141592842343371 * (z0 * z1)))
          	elif t_0 <= 2e+153:
          		tmp = 1.0 / z0
          	else:
          		tmp = z1 * 1.7724539041519165
          	return tmp
          
          function code(z0, z1)
          	t_0 = Float64(sqrt(Float64(Float64(1.0 - z1) - z1)) / Float64(Float64(1.7724539041519165 * z1) * exp(Float64(z1 * z1))))
          	tmp = 0.0
          	if (t_0 <= -5e+43)
          		tmp = Float64(z1 * Float64(1.7724539041519165 + Float64(-3.141592842343371 * Float64(z0 * z1))));
          	elseif (t_0 <= 2e+153)
          		tmp = Float64(1.0 / z0);
          	else
          		tmp = Float64(z1 * 1.7724539041519165);
          	end
          	return tmp
          end
          
          function tmp_2 = code(z0, z1)
          	t_0 = sqrt(((1.0 - z1) - z1)) / ((1.7724539041519165 * z1) * exp((z1 * z1)));
          	tmp = 0.0;
          	if (t_0 <= -5e+43)
          		tmp = z1 * (1.7724539041519165 + (-3.141592842343371 * (z0 * z1)));
          	elseif (t_0 <= 2e+153)
          		tmp = 1.0 / z0;
          	else
          		tmp = z1 * 1.7724539041519165;
          	end
          	tmp_2 = tmp;
          end
          
          code[z0_, z1_] := Block[{t$95$0 = N[(N[Sqrt[N[(N[(1.0 - z1), $MachinePrecision] - z1), $MachinePrecision]], $MachinePrecision] / N[(N[(1.7724539041519165 * z1), $MachinePrecision] * N[Exp[N[(z1 * z1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+43], N[(z1 * N[(1.7724539041519165 + N[(-3.141592842343371 * N[(z0 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+153], N[(1.0 / z0), $MachinePrecision], N[(z1 * 1.7724539041519165), $MachinePrecision]]]]
          
          \begin{array}{l}
          t_0 := \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}\\
          \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+43}:\\
          \;\;\;\;z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z0 \cdot z1\right)\right)\\
          
          \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+153}:\\
          \;\;\;\;\frac{1}{z0}\\
          
          \mathbf{else}:\\
          \;\;\;\;z1 \cdot 1.7724539041519165\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (/.f64 (sqrt.f64 (-.f64 (-.f64 #s(literal 1 binary64) z1) z1)) (*.f64 (*.f64 #s(literal 3544907808303833/2000000000000000 binary64) z1) (exp.f64 (*.f64 z1 z1)))) < -5.0000000000000004e43

            1. Initial program 99.8%

              \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
            2. Taylor expanded in z0 around inf

              \[\leadsto \color{blue}{\frac{1}{z0}} \]
            3. Step-by-step derivation
              1. lower-/.f6434.9%

                \[\leadsto \frac{1}{\color{blue}{z0}} \]
            4. Applied rewrites34.9%

              \[\leadsto \color{blue}{\frac{1}{z0}} \]
            5. Taylor expanded in z1 around 0

              \[\leadsto \color{blue}{z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto z1 \cdot \color{blue}{\left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
              2. lower-+.f64N/A

                \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \color{blue}{\frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
              3. lower-*.f64N/A

                \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \color{blue}{\left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
              4. lower-*.f64N/A

                \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \color{blue}{\left(\frac{1544907808303833}{3544907808303833} + z0\right)}\right)\right) \]
              5. lower-+.f6450.4%

                \[\leadsto z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + \color{blue}{z0}\right)\right)\right) \]
            7. Applied rewrites50.4%

              \[\leadsto \color{blue}{z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + z0\right)\right)\right)} \]
            8. Taylor expanded in z0 around inf

              \[\leadsto z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z0 \cdot \color{blue}{z1}\right)\right) \]
            9. Step-by-step derivation
              1. lower-*.f6450.1%

                \[\leadsto z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z0 \cdot z1\right)\right) \]
            10. Applied rewrites50.1%

              \[\leadsto z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z0 \cdot \color{blue}{z1}\right)\right) \]

            if -5.0000000000000004e43 < (/.f64 (sqrt.f64 (-.f64 (-.f64 #s(literal 1 binary64) z1) z1)) (*.f64 (*.f64 #s(literal 3544907808303833/2000000000000000 binary64) z1) (exp.f64 (*.f64 z1 z1)))) < 2e153

            1. Initial program 99.8%

              \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
            2. Taylor expanded in z0 around inf

              \[\leadsto \color{blue}{\frac{1}{z0}} \]
            3. Step-by-step derivation
              1. lower-/.f6434.9%

                \[\leadsto \frac{1}{\color{blue}{z0}} \]
            4. Applied rewrites34.9%

              \[\leadsto \color{blue}{\frac{1}{z0}} \]

            if 2e153 < (/.f64 (sqrt.f64 (-.f64 (-.f64 #s(literal 1 binary64) z1) z1)) (*.f64 (*.f64 #s(literal 3544907808303833/2000000000000000 binary64) z1) (exp.f64 (*.f64 z1 z1))))

            1. Initial program 99.8%

              \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
            2. Taylor expanded in z0 around inf

              \[\leadsto \color{blue}{\frac{1}{z0}} \]
            3. Step-by-step derivation
              1. lower-/.f6434.9%

                \[\leadsto \frac{1}{\color{blue}{z0}} \]
            4. Applied rewrites34.9%

              \[\leadsto \color{blue}{\frac{1}{z0}} \]
            5. Taylor expanded in z1 around 0

              \[\leadsto \color{blue}{z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto z1 \cdot \color{blue}{\left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
              2. lower-+.f64N/A

                \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \color{blue}{\frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
              3. lower-*.f64N/A

                \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \color{blue}{\left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
              4. lower-*.f64N/A

                \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \color{blue}{\left(\frac{1544907808303833}{3544907808303833} + z0\right)}\right)\right) \]
              5. lower-+.f6450.4%

                \[\leadsto z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + \color{blue}{z0}\right)\right)\right) \]
            7. Applied rewrites50.4%

              \[\leadsto \color{blue}{z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + z0\right)\right)\right)} \]
            8. Taylor expanded in z1 around 0

              \[\leadsto z1 \cdot \frac{3544907808303833}{2000000000000000} \]
            9. Step-by-step derivation
              1. Applied rewrites50.2%

                \[\leadsto z1 \cdot 1.7724539041519165 \]
            10. Recombined 3 regimes into one program.
            11. Add Preprocessing

            Alternative 6: 63.7% accurate, 6.7× speedup?

            \[\begin{array}{l} \mathbf{if}\;z1 \leq -1.4 \cdot 10^{-35}:\\ \;\;\;\;\frac{1}{z0}\\ \mathbf{elif}\;z1 \leq 2.8 \cdot 10^{-155}:\\ \;\;\;\;z1 \cdot 1.7724539041519165\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z0}\\ \end{array} \]
            (FPCore (z0 z1)
              :precision binary64
              (if (<= z1 -1.4e-35)
              (/ 1.0 z0)
              (if (<= z1 2.8e-155) (* z1 1.7724539041519165) (/ 1.0 z0))))
            double code(double z0, double z1) {
            	double tmp;
            	if (z1 <= -1.4e-35) {
            		tmp = 1.0 / z0;
            	} else if (z1 <= 2.8e-155) {
            		tmp = z1 * 1.7724539041519165;
            	} else {
            		tmp = 1.0 / z0;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(z0, z1)
            use fmin_fmax_functions
                real(8), intent (in) :: z0
                real(8), intent (in) :: z1
                real(8) :: tmp
                if (z1 <= (-1.4d-35)) then
                    tmp = 1.0d0 / z0
                else if (z1 <= 2.8d-155) then
                    tmp = z1 * 1.7724539041519165d0
                else
                    tmp = 1.0d0 / z0
                end if
                code = tmp
            end function
            
            public static double code(double z0, double z1) {
            	double tmp;
            	if (z1 <= -1.4e-35) {
            		tmp = 1.0 / z0;
            	} else if (z1 <= 2.8e-155) {
            		tmp = z1 * 1.7724539041519165;
            	} else {
            		tmp = 1.0 / z0;
            	}
            	return tmp;
            }
            
            def code(z0, z1):
            	tmp = 0
            	if z1 <= -1.4e-35:
            		tmp = 1.0 / z0
            	elif z1 <= 2.8e-155:
            		tmp = z1 * 1.7724539041519165
            	else:
            		tmp = 1.0 / z0
            	return tmp
            
            function code(z0, z1)
            	tmp = 0.0
            	if (z1 <= -1.4e-35)
            		tmp = Float64(1.0 / z0);
            	elseif (z1 <= 2.8e-155)
            		tmp = Float64(z1 * 1.7724539041519165);
            	else
            		tmp = Float64(1.0 / z0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(z0, z1)
            	tmp = 0.0;
            	if (z1 <= -1.4e-35)
            		tmp = 1.0 / z0;
            	elseif (z1 <= 2.8e-155)
            		tmp = z1 * 1.7724539041519165;
            	else
            		tmp = 1.0 / z0;
            	end
            	tmp_2 = tmp;
            end
            
            code[z0_, z1_] := If[LessEqual[z1, -1.4e-35], N[(1.0 / z0), $MachinePrecision], If[LessEqual[z1, 2.8e-155], N[(z1 * 1.7724539041519165), $MachinePrecision], N[(1.0 / z0), $MachinePrecision]]]
            
            \begin{array}{l}
            \mathbf{if}\;z1 \leq -1.4 \cdot 10^{-35}:\\
            \;\;\;\;\frac{1}{z0}\\
            
            \mathbf{elif}\;z1 \leq 2.8 \cdot 10^{-155}:\\
            \;\;\;\;z1 \cdot 1.7724539041519165\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{z0}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z1 < -1.4e-35 or 2.8e-155 < z1

              1. Initial program 99.8%

                \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
              2. Taylor expanded in z0 around inf

                \[\leadsto \color{blue}{\frac{1}{z0}} \]
              3. Step-by-step derivation
                1. lower-/.f6434.9%

                  \[\leadsto \frac{1}{\color{blue}{z0}} \]
              4. Applied rewrites34.9%

                \[\leadsto \color{blue}{\frac{1}{z0}} \]

              if -1.4e-35 < z1 < 2.8e-155

              1. Initial program 99.8%

                \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
              2. Taylor expanded in z0 around inf

                \[\leadsto \color{blue}{\frac{1}{z0}} \]
              3. Step-by-step derivation
                1. lower-/.f6434.9%

                  \[\leadsto \frac{1}{\color{blue}{z0}} \]
              4. Applied rewrites34.9%

                \[\leadsto \color{blue}{\frac{1}{z0}} \]
              5. Taylor expanded in z1 around 0

                \[\leadsto \color{blue}{z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
              6. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto z1 \cdot \color{blue}{\left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
                2. lower-+.f64N/A

                  \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \color{blue}{\frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \color{blue}{\left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
                4. lower-*.f64N/A

                  \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \color{blue}{\left(\frac{1544907808303833}{3544907808303833} + z0\right)}\right)\right) \]
                5. lower-+.f6450.4%

                  \[\leadsto z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + \color{blue}{z0}\right)\right)\right) \]
              7. Applied rewrites50.4%

                \[\leadsto \color{blue}{z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + z0\right)\right)\right)} \]
              8. Taylor expanded in z1 around 0

                \[\leadsto z1 \cdot \frac{3544907808303833}{2000000000000000} \]
              9. Step-by-step derivation
                1. Applied rewrites50.2%

                  \[\leadsto z1 \cdot 1.7724539041519165 \]
              10. Recombined 2 regimes into one program.
              11. Add Preprocessing

              Alternative 7: 63.6% accurate, 6.1× speedup?

              \[\begin{array}{l} \mathbf{if}\;z1 \leq -1.4 \cdot 10^{-35}:\\ \;\;\;\;\frac{1}{z0}\\ \mathbf{elif}\;z1 \leq 2.8 \cdot 10^{-155}:\\ \;\;\;\;z1 \cdot \left(1.7724539041519165 + -1.3691389381914547 \cdot z1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z0}\\ \end{array} \]
              (FPCore (z0 z1)
                :precision binary64
                (if (<= z1 -1.4e-35)
                (/ 1.0 z0)
                (if (<= z1 2.8e-155)
                  (* z1 (+ 1.7724539041519165 (* -1.3691389381914547 z1)))
                  (/ 1.0 z0))))
              double code(double z0, double z1) {
              	double tmp;
              	if (z1 <= -1.4e-35) {
              		tmp = 1.0 / z0;
              	} else if (z1 <= 2.8e-155) {
              		tmp = z1 * (1.7724539041519165 + (-1.3691389381914547 * z1));
              	} else {
              		tmp = 1.0 / z0;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(z0, z1)
              use fmin_fmax_functions
                  real(8), intent (in) :: z0
                  real(8), intent (in) :: z1
                  real(8) :: tmp
                  if (z1 <= (-1.4d-35)) then
                      tmp = 1.0d0 / z0
                  else if (z1 <= 2.8d-155) then
                      tmp = z1 * (1.7724539041519165d0 + ((-1.3691389381914547d0) * z1))
                  else
                      tmp = 1.0d0 / z0
                  end if
                  code = tmp
              end function
              
              public static double code(double z0, double z1) {
              	double tmp;
              	if (z1 <= -1.4e-35) {
              		tmp = 1.0 / z0;
              	} else if (z1 <= 2.8e-155) {
              		tmp = z1 * (1.7724539041519165 + (-1.3691389381914547 * z1));
              	} else {
              		tmp = 1.0 / z0;
              	}
              	return tmp;
              }
              
              def code(z0, z1):
              	tmp = 0
              	if z1 <= -1.4e-35:
              		tmp = 1.0 / z0
              	elif z1 <= 2.8e-155:
              		tmp = z1 * (1.7724539041519165 + (-1.3691389381914547 * z1))
              	else:
              		tmp = 1.0 / z0
              	return tmp
              
              function code(z0, z1)
              	tmp = 0.0
              	if (z1 <= -1.4e-35)
              		tmp = Float64(1.0 / z0);
              	elseif (z1 <= 2.8e-155)
              		tmp = Float64(z1 * Float64(1.7724539041519165 + Float64(-1.3691389381914547 * z1)));
              	else
              		tmp = Float64(1.0 / z0);
              	end
              	return tmp
              end
              
              function tmp_2 = code(z0, z1)
              	tmp = 0.0;
              	if (z1 <= -1.4e-35)
              		tmp = 1.0 / z0;
              	elseif (z1 <= 2.8e-155)
              		tmp = z1 * (1.7724539041519165 + (-1.3691389381914547 * z1));
              	else
              		tmp = 1.0 / z0;
              	end
              	tmp_2 = tmp;
              end
              
              code[z0_, z1_] := If[LessEqual[z1, -1.4e-35], N[(1.0 / z0), $MachinePrecision], If[LessEqual[z1, 2.8e-155], N[(z1 * N[(1.7724539041519165 + N[(-1.3691389381914547 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / z0), $MachinePrecision]]]
              
              \begin{array}{l}
              \mathbf{if}\;z1 \leq -1.4 \cdot 10^{-35}:\\
              \;\;\;\;\frac{1}{z0}\\
              
              \mathbf{elif}\;z1 \leq 2.8 \cdot 10^{-155}:\\
              \;\;\;\;z1 \cdot \left(1.7724539041519165 + -1.3691389381914547 \cdot z1\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{1}{z0}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z1 < -1.4e-35 or 2.8e-155 < z1

                1. Initial program 99.8%

                  \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
                2. Taylor expanded in z0 around inf

                  \[\leadsto \color{blue}{\frac{1}{z0}} \]
                3. Step-by-step derivation
                  1. lower-/.f6434.9%

                    \[\leadsto \frac{1}{\color{blue}{z0}} \]
                4. Applied rewrites34.9%

                  \[\leadsto \color{blue}{\frac{1}{z0}} \]

                if -1.4e-35 < z1 < 2.8e-155

                1. Initial program 99.8%

                  \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
                2. Taylor expanded in z0 around inf

                  \[\leadsto \color{blue}{\frac{1}{z0}} \]
                3. Step-by-step derivation
                  1. lower-/.f6434.9%

                    \[\leadsto \frac{1}{\color{blue}{z0}} \]
                4. Applied rewrites34.9%

                  \[\leadsto \color{blue}{\frac{1}{z0}} \]
                5. Taylor expanded in z1 around 0

                  \[\leadsto \color{blue}{z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
                6. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto z1 \cdot \color{blue}{\left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
                  2. lower-+.f64N/A

                    \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \color{blue}{\frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
                  3. lower-*.f64N/A

                    \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \color{blue}{\left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
                  4. lower-*.f64N/A

                    \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \color{blue}{\left(\frac{1544907808303833}{3544907808303833} + z0\right)}\right)\right) \]
                  5. lower-+.f6450.4%

                    \[\leadsto z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + \color{blue}{z0}\right)\right)\right) \]
                7. Applied rewrites50.4%

                  \[\leadsto \color{blue}{z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + z0\right)\right)\right)} \]
                8. Taylor expanded in z0 around 0

                  \[\leadsto z1 \cdot \left(1.7724539041519165 + \frac{-5476555752765818812148442491889}{4000000000000000000000000000000} \cdot \color{blue}{z1}\right) \]
                9. Step-by-step derivation
                  1. lower-*.f6450.5%

                    \[\leadsto z1 \cdot \left(1.7724539041519165 + -1.3691389381914547 \cdot z1\right) \]
                10. Applied rewrites50.5%

                  \[\leadsto z1 \cdot \left(1.7724539041519165 + -1.3691389381914547 \cdot \color{blue}{z1}\right) \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 8: 50.2% accurate, 26.7× speedup?

              \[z1 \cdot 1.7724539041519165 \]
              (FPCore (z0 z1)
                :precision binary64
                (* z1 1.7724539041519165))
              double code(double z0, double z1) {
              	return z1 * 1.7724539041519165;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(z0, z1)
              use fmin_fmax_functions
                  real(8), intent (in) :: z0
                  real(8), intent (in) :: z1
                  code = z1 * 1.7724539041519165d0
              end function
              
              public static double code(double z0, double z1) {
              	return z1 * 1.7724539041519165;
              }
              
              def code(z0, z1):
              	return z1 * 1.7724539041519165
              
              function code(z0, z1)
              	return Float64(z1 * 1.7724539041519165)
              end
              
              function tmp = code(z0, z1)
              	tmp = z1 * 1.7724539041519165;
              end
              
              code[z0_, z1_] := N[(z1 * 1.7724539041519165), $MachinePrecision]
              
              z1 \cdot 1.7724539041519165
              
              Derivation
              1. Initial program 99.8%

                \[\frac{-1}{\left(-1 - z0\right) - \frac{\sqrt{\left(1 - z1\right) - z1}}{\left(1.7724539041519165 \cdot z1\right) \cdot e^{z1 \cdot z1}}} \]
              2. Taylor expanded in z0 around inf

                \[\leadsto \color{blue}{\frac{1}{z0}} \]
              3. Step-by-step derivation
                1. lower-/.f6434.9%

                  \[\leadsto \frac{1}{\color{blue}{z0}} \]
              4. Applied rewrites34.9%

                \[\leadsto \color{blue}{\frac{1}{z0}} \]
              5. Taylor expanded in z1 around 0

                \[\leadsto \color{blue}{z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
              6. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto z1 \cdot \color{blue}{\left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)\right)} \]
                2. lower-+.f64N/A

                  \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \color{blue}{\frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \color{blue}{\left(z1 \cdot \left(\frac{1544907808303833}{3544907808303833} + z0\right)\right)}\right) \]
                4. lower-*.f64N/A

                  \[\leadsto z1 \cdot \left(\frac{3544907808303833}{2000000000000000} + \frac{-12566371369373484812148442491889}{4000000000000000000000000000000} \cdot \left(z1 \cdot \color{blue}{\left(\frac{1544907808303833}{3544907808303833} + z0\right)}\right)\right) \]
                5. lower-+.f6450.4%

                  \[\leadsto z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + \color{blue}{z0}\right)\right)\right) \]
              7. Applied rewrites50.4%

                \[\leadsto \color{blue}{z1 \cdot \left(1.7724539041519165 + -3.141592842343371 \cdot \left(z1 \cdot \left(0.4358104334010989 + z0\right)\right)\right)} \]
              8. Taylor expanded in z1 around 0

                \[\leadsto z1 \cdot \frac{3544907808303833}{2000000000000000} \]
              9. Step-by-step derivation
                1. Applied rewrites50.2%

                  \[\leadsto z1 \cdot 1.7724539041519165 \]
                2. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2025250 
                (FPCore (z0 z1)
                  :name "(/ -1 (- (- -1 z0) (/ (sqrt (- (- 1 z1) z1)) (* (* 3544907808303833/2000000000000000 z1) (exp (* z1 z1))))))"
                  :precision binary64
                  (/ -1.0 (- (- -1.0 z0) (/ (sqrt (- (- 1.0 z1) z1)) (* (* 1.7724539041519165 z1) (exp (* z1 z1)))))))