Average Error: 0.3 → 0.4
Time: 1.1m
Precision: 64
Internal Precision: 576
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[\log \left(e^{\frac{1 - \tan x \cdot \tan x}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}}\right)\]

Error

Bits error versus x

Try it out

  1. Inputs

  2. Original Output:

    Herbie Output:

Derivation

  1. Initial program 0.3

    \[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
  2. Applied simplify0.3

    \[\leadsto \color{blue}{\frac{1 - \tan x \cdot \tan x}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}}\]
  3. Using strategy rm
  4. Applied add-log-exp0.4

    \[\leadsto \color{blue}{\log \left(e^{\frac{1 - \tan x \cdot \tan x}{(\left(\tan x\right) \cdot \left(\tan x\right) + 1)_*}}\right)}\]

Runtime

Time bar (total: 1.1m)Debug logProfile

herbie shell --seed '#(1072361757 3390613284 2339397988 1175251238 145061547 3101881848)' +o rules:numerics
(FPCore (x)
  :name "Trigonometry B"
  (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))