Skip to content

Commit cf85c05

Browse files
authored
docs for erf(x,y) (#224)
1 parent f7fb938 commit cf85c05

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/src/functions_overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Here the *Special Functions* are listed according to the structure of [NIST Digi
3434
| Function | Description |
3535
|:-------- |:----------- |
3636
| [`erf(x)`](@ref SpecialFunctions.erf) | [error function](https://en.wikipedia.org/wiki/Error_function) at ``x`` |
37+
| [`erf(x,y)`](@ref SpecialFunctions.erf) | accurate version of ``\operatorname{erf}(y) - \operatorname{erf}(x)`` |
3738
| [`erfc(x)`](@ref SpecialFunctions.erfc) | complementary error function, i.e. the accurate version of ``1-\operatorname{erf}(x)`` for large ``x`` |
3839
| [`erfcinv(x)`](@ref SpecialFunctions.erfcinv) | inverse function to [`erfc()`](@ref SpecialFunctions.erfc) |
3940
| [`erfcx(x)`](@ref SpecialFunctions.erfcx) | scaled complementary error function, i.e. accurate ``e^{x^2} \operatorname{erfc}(x)`` for large ``x`` |

src/erf.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ Compute the error function of ``x``, defined by
5151
\quad \text{for} \quad x \in \mathbb{C} \, .
5252
```
5353
54+
erf(x, y)
55+
56+
Accurate version of `erf(y) - erf(x)` (for real arguments only).
57+
5458
External links: [DLMF](https://dlmf.nist.gov/7.2.1), [Wikipedia](https://en.wikipedia.org/wiki/Error_function).
5559
5660
See also: [`erfc(x)`](@ref SpecialFunctions.erfc), [`erfcx(x)`](@ref SpecialFunctions.erfcx),
@@ -64,11 +68,6 @@ See also: [`erfc(x)`](@ref SpecialFunctions.erfc), [`erfcx(x)`](@ref SpecialFunc
6468
"""
6569
erf
6670

67-
@doc raw"""
68-
erf(x, y)
69-
70-
Compute the difference `erf(y) - erf(x)`, in a numerically sound way (only for real arguments).
71-
"""
7271
function erf(x::Real, y::Real)
7372
if 0 x && 0 y
7473
erfc(x) - erfc(y)

0 commit comments

Comments
 (0)