add vercos(), avercos(), covercos(), acovercos()

Improved trig help files.

Added new vercos(x, [,eps]) for versed cosine and covercos(x, [,eps])
for inverse versed cosine.

Added new avercos(x, [,eps]) for inverse versed cosine and acovercos(x, [,eps])
for inverse coversed cosine.
This commit is contained in:
Landon Curt Noll
2023-09-06 00:52:37 -07:00
parent ea5b5e0b53
commit fdbf53d7e8
28 changed files with 1218 additions and 59 deletions

View File

@@ -36,8 +36,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, atan, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2023 Landon Curt Noll

View File

@@ -34,8 +34,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2021,2023 Landon Curt Noll

62
help/acovercos Normal file
View File

@@ -0,0 +1,62 @@
NAME
acovercos - inverse coversed trigonometric cosine
SYNOPSIS
acovercos(x [,eps])
TYPES
x number (real or complex)
eps 0 < real < 1, defaults to epsilon()
return number
DESCRIPTION
Calculate the inverse coversed trigonometric cosine of x to a multiple of eps with error less in
absolute value than .75 * eps.
This function is sometimes called acvc, or arccovercos, is equivalent to:
acovercos(x) = asin(x - 1)
EXAMPLE
; print acovercos(.5, 1e-5), acovercos(.5, 1e-10), acovercos(.5, 1e-15), acovercos(.5, 1e-20)
0.5236 0.5235987756 0.523598775598299 0.52359877559829887308
; print acovercos(1), acovercos(-5), acovercos(2 + 3i)
0 -1.57079632679489661923+2.47788873028847500485i 0.30760364953071124992+1.86416154415788242834i
LIMITS
0 < eps < 1
LINK LIBRARY
NUMBER *qacovercos(NUMBER *x, NUMBER *eps)
COMPLEX *c_acovercos(COMPLEX *x, NUMBER *eps)
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 2023 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## Under source code control: 2023/09/05 23:30:08
## File existed as early as: 2023
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -11,11 +11,10 @@ TYPES
return number
DESCRIPTION
Calculate the inverse coversed sine of x to a multiple of eps with error less in
Calculate the inverse coversed trigonometric sine of x to a multiple of eps with error less in
absolute value than .75 * eps.
The coversed sine function is sometimes called covers, or acosiv, or acvs,
may be defined as:
This function is sometimes called acovers, or acvs, or arccoversin, is equivalent to:
acoversin(x) = asin(1 - x)
@@ -36,8 +35,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin
aversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 2023 Landon Curt Noll

View File

@@ -34,8 +34,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, asec
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2021,2023 Landon Curt Noll

View File

@@ -34,8 +34,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2021,2023 Landon Curt Noll

View File

@@ -36,8 +36,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
acos, atan, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2021,2023 Landon Curt Noll

View File

@@ -34,8 +34,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2023 Landon Curt Noll

63
help/avercos Normal file
View File

@@ -0,0 +1,63 @@
NAME
avercos - inverse versed trigonometric cosine
SYNOPSIS
avercos(x [,eps])
TYPES
x number (real or complex)
eps 0 < real < 1, defaults to epsilon()
return real
DESCRIPTION
Returns the inverse versed trigonometric cosine of x to a multiple of eps with error less in
absolute value than .75 * eps.
This function is sometimes called averc, or arcvercos, is equivalent to:
avercos(x) = acos(x - 1)
EXAMPLE
; print avercos(.5, 1e-5), avercos(.5, 1e-10), avercos(.5, 1e-15), avercos(.5, 1e-20)
2.0944 2.0943951024 2.094395102393195 2.09439510239319549231
; print avercos(2), avercos(-5), avercos(2 + 3i)
0 3.14159265358979323846-2.47788873028847500481i 1.26319267726418536931-1.86416154415788242834i
LIMITS
0 < eps < 1
LINK LIBRARY
NUMBER *qavercos_or_NULL(NUMBER *q, NUMBER *epsilon);
NUMBER *qavercos(NUMBER *q, NUMBER *epsilon);
COMPLEX *c_avercos(COMPLEX *c, NUMBER *epsilon);
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 2023 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## Under source code control: 2023/09/05 23:40:24
## File existed as early as: 2023
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -11,11 +11,10 @@ TYPES
return real
DESCRIPTION
Returns the inverse versed sine of x to a multiple of eps with error less in
Returns the inverse versed trigonometric sine of x to a multiple of eps with error less in
absolute value than .75 * eps.
The inverse versed sine function is sometimes called avers, sometimes called aver,
may be defined as:
This function is sometimes called avers, or arcversin, is equivalent to:
aversin(x) = acos(1 - x)

View File

@@ -35,8 +35,8 @@ LINK LIBRARY
SEE ALSO
sin, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2021,2023 Landon Curt Noll

View File

@@ -28,8 +28,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2021,2023 Landon Curt Noll

69
help/covercos Normal file
View File

@@ -0,0 +1,69 @@
NAME
covercos - coversed trigonometric cosine
SYNOPSIS
covercos(x [,eps])
TYPES
x number (real or complex)
eps 0 < real < 1, defaults to epsilon()
return number
DESCRIPTION
Calculate the coversed trigonometric cosine of x to a multiple of eps with error less in
absolute value than .75 * eps.
This function is sometimes called cvc, is equivalent to:
covercos(x) = 1 + sin(x)
EXAMPLE
; print covercos(0.2), covercos(3/7), covercos(-31)
1.19866933079506121546 1.41557185499305200807 1.40403764532306500605
; print covercos(1, 1e-5), covercos(1, 1e-10), covercos(1, 1e-15), covercos(1, 1e-20)
1.84147 1.8414709848 1.841470984807896 1.84147098480789650665
; print covercos(2 + 3i, 1e-5), covercos(2 + 3i, 1e-10)
10.1545-4.16891i 10.1544991469-4.16890696i
; pi = pi(1e-20)
; print covercos(pi/6, 1e-10), covercos(pi/2, 1e-10), covercos(pi, 1e-10), covercos(3*pi/2, 1e-10)
1.5 2 1 0
LIMITS
0 < eps < 1
LINK LIBRARY
NUMBER *qcovercos(NUMBER *x, NUMBER *eps)
COMPLEX *c_covercos(COMPLEX *x, NUMBER *eps)
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 2023 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## Under source code control: 2023/09/05 23:31:08
## File existed as early as: 2023
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -11,11 +11,10 @@ TYPES
return number
DESCRIPTION
Calculate the coversed sine of x to a multiple of eps with error less in
Calculate the coversed trigonometric sine of x to a multiple of eps with error less in
absolute value than .75 * eps.
The coversed sine function is sometimes called covers, or cosiv, or cvs,
may be defined as:
This function is sometimes called covers, or cvs, is equivalent to:
coversin(x) = 1 - sin(x)
@@ -43,8 +42,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 2023 Landon Curt Noll

View File

@@ -27,8 +27,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec
asin, acos, atan, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2023 Landon Curt Noll

View File

@@ -28,8 +28,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, csc
asin, acos, atan, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2023 Landon Curt Noll

View File

@@ -35,8 +35,8 @@ LINK LIBRARY
SEE ALSO
cos, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2021,2023 Landon Curt Noll

View File

@@ -29,8 +29,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 1999,2023 Landon Curt Noll

69
help/vercos Normal file
View File

@@ -0,0 +1,69 @@
NAME
vercos - versed trigonometric cosine
SYNOPSIS
vercos(x [,eps])
TYPES
x number (real or complex)
eps 0 < real < 1, defaults to epsilon()
return number
DESCRIPTION
Calculate the versed trigonometric cosine of x to a multiple of eps with error less in
absolute value than .75 * eps.
This function is sometimes called verc, is equivalent to:
vercos(x) = 1 + cos(x)
EXAMPLE
; print vercos(0.2), vercos(3/7), vercos(-31)
1.98006657784124163112 1.90956035167416667403 1.91474235780453127896
; print vercos(1, 1e-5), vercos(1, 1e-10), vercos(1, 1e-15), vercos(1, 1e-20)
1.5403 1.5403023059 1.54030230586814 1.5403023058681397174
; print vercos(2 + 3i, 1e-5), vercos(2 + 3i, 1e-10)
-3.18963-9.10923i -3.189625691-9.1092278938i
; pi = pi(1e-20)
; print vercos(pi/3, 1e-10), vercos(pi/2, 1e-10), vercos(pi, 1e-10), vercos(3*pi/2, 1e-10)
1.5 1 0 1
LIMITS
0 < eps < 1
LINK LIBRARY
NUMBER *qvercos(NUMBER *x, NUMBER *eps)
COMPLEX *c_vercos(COMPLEX *x, NUMBER *eps)
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 2023 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## Under source code control: 2023/09/05 23:25:28
## File existed as early as: 2023
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -11,11 +11,10 @@ TYPES
return number
DESCRIPTION
Calculate the versed sine of x to a multiple of eps with error less in
Calculate the versed trigonometric sine of x to a multiple of eps with error less in
absolute value than .75 * eps.
The versed sine function is sometimes called vers, sometimes called ver,
may be defined as:
This function is sometimes called vers, is equivalent to:
versin(x) = 1 - cos(x)
@@ -43,8 +42,8 @@ LINK LIBRARY
SEE ALSO
sin, cos, tan, cot, sec, csc
asin, acos, atan, acot, asec, acsc
coversin
aversin. acoversin
versin, coversin, vercos, avercos
aversin, acoversin, covercos, acovercos
epsilon
## Copyright (C) 2023 Landon Curt Noll