Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: bbf7bbd230
Fetching contributors…

Cannot retrieve contributors at this time

499 lines (449 sloc) 16.076 kb
// DO NOT EDIT! Autogenerated file, created by tools/make_trig_code.pl.
using Niecza;
using System;
public partial class Builtins {
static readonly Func<Constants,Variable,Variable> sin_d = sin;
[ImplicitConsts] public static Variable sin(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, sin_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Sin());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Sin(v1));
}
}
static readonly Func<Constants,Variable,Variable> asin_d = asin;
[ImplicitConsts] public static Variable asin(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, asin_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Asin());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Asin(v1));
}
}
static readonly Func<Constants,Variable,Variable> cos_d = cos;
[ImplicitConsts] public static Variable cos(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, cos_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Cos());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Cos(v1));
}
}
static readonly Func<Constants,Variable,Variable> acos_d = acos;
[ImplicitConsts] public static Variable acos(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, acos_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Acos());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Acos(v1));
}
}
static readonly Func<Constants,Variable,Variable> tan_d = tan;
[ImplicitConsts] public static Variable tan(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, tan_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Tan());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Tan(v1));
}
}
static readonly Func<Constants,Variable,Variable> atan_d = atan;
[ImplicitConsts] public static Variable atan(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, atan_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Atan());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Atan(v1));
}
}
static readonly Func<Constants,Variable,Variable> sinh_d = sinh;
[ImplicitConsts] public static Variable sinh(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, sinh_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Sinh());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Sinh();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> asinh_d = asinh;
[ImplicitConsts] public static Variable asinh(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, asinh_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Asinh());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Asinh();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> cosh_d = cosh;
[ImplicitConsts] public static Variable cosh(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, cosh_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Cosh());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Cosh();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> acosh_d = acosh;
[ImplicitConsts] public static Variable acosh(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, acosh_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Acosh());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Acosh();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> tanh_d = tanh;
[ImplicitConsts] public static Variable tanh(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, tanh_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Tanh());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Tanh();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> atanh_d = atanh;
[ImplicitConsts] public static Variable atanh(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, atanh_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Atanh());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Atanh();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> acotanh_d = acotanh;
[ImplicitConsts] public static Variable acotanh(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, acotanh_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Acotanh());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Acotanh();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> asec_d = asec;
[ImplicitConsts] public static Variable asec(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, asec_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Asec());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Acos(1 / v1));
}
}
static readonly Func<Constants,Variable,Variable> cosech_d = cosech;
[ImplicitConsts] public static Variable cosech(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, cosech_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Cosech());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Cosech();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> acosech_d = acosech;
[ImplicitConsts] public static Variable acosech(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, acosech_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Acosech());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Acosech();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> sec_d = sec;
[ImplicitConsts] public static Variable sec(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, sec_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Sec());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(1 / Math.Cos(v1));
}
}
static readonly Func<Constants,Variable,Variable> acosec_d = acosec;
[ImplicitConsts] public static Variable acosec(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, acosec_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Acosec());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Asin(1 / v1));
}
}
static readonly Func<Constants,Variable,Variable> cotanh_d = cotanh;
[ImplicitConsts] public static Variable cotanh(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, cotanh_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Cotanh());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Cotanh();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> sech_d = sech;
[ImplicitConsts] public static Variable sech(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, sech_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Sech());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Sech();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
static readonly Func<Constants,Variable,Variable> cotan_d = cotan;
[ImplicitConsts] public static Variable cotan(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, cotan_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Cotan());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(1 / Math.Tan(v1));
}
}
static readonly Func<Constants,Variable,Variable> acotan_d = acotan;
[ImplicitConsts] public static Variable acotan(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, acotan_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Acotan());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(Math.Atan(1 / v1));
}
}
static readonly Func<Constants,Variable,Variable> cosec_d = cosec;
[ImplicitConsts] public static Variable cosec(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, cosec_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Cosec());
}
{
double v1 = PromoteToFloat(r1, n1);
return MakeFloat(1 / Math.Sin(v1));
}
}
static readonly Func<Constants,Variable,Variable> asech_d = asech;
[ImplicitConsts] public static Variable asech(Constants c, Variable a1) {
P6any o1 = a1.Fetch();
int r1;
if (!o1.mo.is_any)
return HandleSpecial1(c, a1,o1, asech_d);
P6any n1 = GetNumber(a1, o1, out r1);
if (r1 == NR_COMPLEX) {
Complex v1 = PromoteToComplex(r1, n1);
return MakeComplex(v1.Asech());
}
{
Complex v1 = PromoteToComplex(r1, n1);
Complex v2 = v1.Asech();
if (v2.im < -1e-15 || v2.im > 1e-15) {
return MakeFloat(double.NaN);
} else {
return MakeFloat(v2.re);
}
}
}
}
Jump to Line
Something went wrong with that request. Please try again.