Files
calc/help/coversin
Landon Curt Noll 7398fbb2e9 rename vercos to coversin
The code to compute 1 - sin(x) belongs to coversin, not vercos.
2023-09-01 23:26:26 -07:00

68 lines
2.1 KiB
Plaintext

NAME
coversin - coversed sine
SYNOPSIS
coversin(x [,eps])
TYPES
x number (real or complex)
eps 0 < real < 1, defaults to epsilon()
return number
DESCRIPTION
Calculate the versed cosine 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:
coversin(x) = 1 - sin(x)
EXAMPLE
; print coversin(0.2), coversin(3/7), coversin(-31)
0.80133066920493878454 0.58442814500694799193 0.59596235467693499395
; print coversin(1, 1e-5), coversin(1, 1e-10), coversin(1, 1e-15), coversin(1, 1e-20)
0.15853 0.1585290152 0.158529015192104 0.15852901519210349335
; print coversin(2 + 3i, 1e-5), coversin(2 + 3i, 1e-10)
-8.1545+4.16891i -8.1544991469+4.16890696i
; pi = pi(1e-20)
; print coversin(pi/6, 1e-10), coversin(pi/2, 1e-10), coversin(pi, 1e-10), coversin(3*pi/2, 1e-10)
0.5 0 1 2
LIMITS
0 < eps < 1
LINK LIBRARY
NUMBER *qcoversin(NUMBER *x, NUMBER *eps)
COMPLEX *c_coversin(COMPLEX *x, NUMBER *eps)
SEE ALSO
sin, cos, tan, sec, csc, cot, epsilon
versin
## 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/08/31 23:07: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/