// takes the hyperbolic tangent of a number public void HyperbolicTangent() { Entry = ScientificFunctions.Tanh(Entry); first = true; overwrite = true; }
// takes the inverse tangent of the number and returns it in the selected angle units (rads/degrees) public void InverseTangent() { Entry = ScientificFunctions.Arctan(Entry, DegreeSelected); first = true; overwrite = true; }
// takes the hyperbolic cosine of a number public void HyperbolicCosine() { Entry = ScientificFunctions.Cosh(Entry); first = true; overwrite = true; }
//----------triginometric---------- // takes the sine of the number in the selected angle units (rads/degrees) public void Sine() { Entry = ScientificFunctions.Sin(Entry, DegreeSelected); first = true; overwrite = true; }
// takes the inverse cosine of the number and returns it in the selected angle units (rads/degrees) public void InverseCosine() { Entry = ScientificFunctions.Arccos(Entry, DegreeSelected); first = true; overwrite = true; }
//--------------root--------------- /// <summary> /// Cube root of entry /// </summary> public void CubeRoot() { Entry = "" + ScientificFunctions.CubedRoot(Entry); first = true; overwrite = true; }
//-----------logarithmic----------- /// <summary> /// Natural log of entry /// </summary> public void NaturalLog() { Entry = "" + ScientificFunctions.Ln(Entry); first = true; overwrite = true; }
//---------------------------------------------------------------------------- //--------------------------End of simple calculator-------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //--------------------------Start of scientific calculator-------------------- //---------------------------------------------------------------------------- //-----------exponential----------- /// <summary> /// Squares entry /// </summary> public void Square() { Entry = ScientificFunctions.Square(Entry); first = true; overwrite = true; }
/// <summary> /// Cubes entry /// </summary> public void Cube() { Entry = ScientificFunctions.Cube(Entry); first = true; overwrite = true; }
/// <summary> /// Finds new display based on previous operator /// </summary> public void Equals() { if (numBase != "dec") { Entry = ProgrammerFunctions.ConvertBase(Entry, numBase, "dec"); PreEntry = ProgrammerFunctions.ConvertBase(PreEntry, preEntryBase, "dec"); } if (operation == "+") { Entry = StandardFunctions.Add(PreEntry, Entry); } else if (operation == "-") { Entry = StandardFunctions.Subtract(PreEntry, Entry); } else if (operation == "*") { Entry = StandardFunctions.Multiply(PreEntry, Entry); } else if (operation == "/") { Entry = StandardFunctions.Divide(PreEntry, Entry); } else if (operation == "exp") { Entry = ScientificFunctions.GenericExponent(PreEntry, Entry); } else if (operation == "root") { Entry = ScientificFunctions.GenericRoot(PreEntry, Entry); } else if (operation == "log") { Entry = ScientificFunctions.GenericLog(PreEntry, Entry); } else if (operation == "power") { Entry = ScientificFunctions.ScientificNotation(Entry); } else if (operation == "i") { Entry = StandardFunctions.IntegerDivide(PreEntry, Entry); } else if (operation == "mod") { Entry = StandardFunctions.Mod(PreEntry, Entry); } PreEntry = Entry; if (numBase != "dec") { Entry = ProgrammerFunctions.ConvertBase(Entry, "dec", numBase); PreEntry = ProgrammerFunctions.ConvertBase(PreEntry, "dec", numBase); } first = true; overwrite = true; operation = ""; enteredNum = false; }
//-----------hyperbolic------------ // takes the hyperbolic sine of a number public void HyperbolicSine() { entry = ScientificFunctions.Sinh(entry); first = true; overwrite = true; }
// takes the inverse sine of the number and returns it in the selected angle units (rads/degrees) public void InverseSine() { entry = ScientificFunctions.Arcsin(entry, degreeSelected); first = true; overwrite = true; }
// takes the tangent of the number in the selected angle units (rads/degrees) public void Tangent() { entry = ScientificFunctions.Tan(entry, degreeSelected); first = true; overwrite = true; }
// takes the cossine of the number in the selected angle units (rads/degrees) public void Cosine() { entry = ScientificFunctions.Cos(entry, degreeSelected); first = true; overwrite = true; }