import java.util.Scanner; import java.lang.Math; import java.lang.*; /** * @Joshua Chung & Mexi Liang * @1.0 05/27/2018 */ public class Calculator extends Main{ public double add(double x, double y){ return x + y; } public double subtract(double x, double y){ return x - y; } public double multiply(double x, double y){ return x * y; } public double divide(double x, double y){ return x / y; } public double getPow(double x, double y){ return Math.pow(x, y); } public double invert(double x){ return x * (-1); } public double square(double x){ return x * x; } public double squareRoot(double x){ return Math.sqrt(x); } public double getInverse(double x){ return (1/x); } public double getCosine(double x){ return Math.cos(x); } public double getSine(double x){ return Math.sin(x); } public double getTan(double x){ return Math.tan(x); } public double inverseSin(double x){ return Math.asin(x); } public double inverseCos(double x){ return Math.acos(x); } public double inverseTan(double x){ return Math.atan(x); } public static double factorial(double x){ double result = 1; for(double value = 2; value <= x; value++) { result *= value; } return result; } public double log(double x){ return Math.log10(x); } public double inverseLog(double x){ return Math.exp(x); } public double natLog(double x){ return Math.log(x); } public long round(double x){ return Math.round(x); } }