Tom added RAD and filled in the stubs in SB with the following functions. (SB 2.2 only)
' Given the starting value of 34 degrees, calculate radians.
' Given the radian value, calculate TAN, COTAN, SECANT and COSECANT.
' Given the TAN, COTAN, SECANT and COSECANT values,
' calculate the ATAN, ACTAN, ASECANT and ACOSECANT.
'
degval = 34
radval = RAD(degval)
zerval = 0
tanval = TAN(radval)
cotval = COTAN(radval)
secval = SECANT(radval)
cseval = COSECANT(radval)
ataval = ATAN(tanval)
actval = ACTAN(cotval)
aseval = ASECANT(secval)
acoval = ACOSECANT(cseval)
hsinv = HSIN(radval)
hcosv = HCOS(radval)
htanv = HTAN(radval)
hsecv = HSECANT(radval)
hcosc = HCOSECANT(radval)
hcotv = HCTAN(radval)
print "\nThe following 8 functions accept radians as their argument, so we "
print "use the\nnew RAD() function to convert ",degval," degrees to ",radval," (",str$(radval),") radians.\n\n"
print "Tangent\t\tCotangent\tSecant\t\tCosecant\n"
print "TAN() \t\tCOTAN() \tSECANT() \tCOSECANT()\n"
print tanval," \t",cotval,"\t",secval," \t",cseval,"\n"
print str$(tanval)," \t",str$(cotval)," \t",str$(secval)," \t",str$(cseval),"\n\n"
print "Arctangent\tArccotangent\tArcsecant\tArccosecant\n"
print "ATAN() \tACTAN() \tASECANT()\tACOSECANT()\n"
print ataval," \t",actval," \t",aseval," \t",acoval,"\n"
print str$(ataval)," \t",str$(actval)," \t",str$(aseval)," \t",str$(acoval),"\n\n"
print "There are 6 Hyperbolic functions. They also accept radian arguments.\n\n"
print "H-Sine\t\tH-Cosine\tH-Tangent\n"
print "HSIN()\t\tHCOS() \tHTAN()\n"
print hsinv," \t",hcosv," \t",htanv,"\n"
print str$(hsinv)," \t",str$(hcosv)," \t",str$(htanv),"\n\n"
print "H-Secant\tH-Cosecant\tH-Cotangent\n"
print "HSECANT()\tHCOSECANT()\tHCTAN()\n"
print hsecv," \t",hcosc," \t",hcotv,"\n"
print str$(hsecv)," \t",str$(hcosc)," \t",str$(hcotv),"\n\n"
Output
jrs@laptop:~/sb/sb22/test$ scriba testmath.sb
The following 8 functions accept radians as their argument, so we use the
new RAD() function to convert 34 degrees to 5.934119e-01 (0.593412) radians.
Tangent Cotangent Secant Cosecant
TAN() COTAN() SECANT() COSECANT()
6.745085e-01 1.482561e+00 1.206218e+00 1.788292e+00
0.674509 1.482561 1.206218 1.788292
Arctangent Arccotangent Arcsecant Arccosecant
ATAN() ACTAN() ASECANT() ACOSECANT()
5.934119e-01 5.934119e-01 5.934119e-01 5.934119e-01
0.593412 0.593412 0.593412 0.593412
There are 6 Hyperbolic functions. They also accept radian arguments.
H-Sine H-Cosine H-Tangent
HSIN() HCOS() HTAN()
6.288574e-01 1.181297e+00 5.323451e-01
0.628857 1.181297 0.532345
H-Secant H-Cosecant H-Cotangent
HSECANT() HCOSECANT() HCTAN()
8.465274e-01 1.590186e+00 1.878481e+00
0.846527 1.590186 1.878481
jrs@laptop:~/sb/sb22/test$
P.S. I have a cleaned up version of this somewhere using SB FORMAT().