本文整理汇总了C#中Calculator.Exp方法的典型用法代码示例。如果您正苦于以下问题:C# Calculator.Exp方法的具体用法?C# Calculator.Exp怎么用?C# Calculator.Exp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Calculator
的用法示例。
在下文中一共展示了Calculator.Exp方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestExponentialNegativeBaseEvenExp
public void TestExponentialNegativeBaseEvenExp()
{
var calc = new Calculator();
var result = calc.Exp(-2, 10);
Assert.AreEqual(1024, result);
}
示例2: TestExponential
public void TestExponential()
{
var calc = new Calculator();
var result = calc.Exp(2, 10);
Assert.AreEqual(1024, result);
}
示例3: TestExponentialNegativeBaseEvenExp
public void TestExponentialNegativeBaseEvenExp() {
//Arrange
var calculator = new Calculator();
//Act
var result = calculator.Exp(-2, 10);
//Assert
Assert.AreEqual(1024, result);
}
示例4: TestExponentialNegativeBaseOddExp
public void TestExponentialNegativeBaseOddExp() {
//Arrange
var calculator = new Calculator();
//Act
var result = calculator.Exp(-2, 9);
//Assert
Assert.AreEqual(-512, result);
}
示例5: TestExponentialNegativeBaseNegativeOddExp
public void TestExponentialNegativeBaseNegativeOddExp()
{
var calc = new Calculator();
var result = calc.Exp(-2, -3);
Assert.AreEqual(-.125, result);
}
示例6: TestExponential3
public void TestExponential3() {
var calc = new Calculator();
var result = calc.Exp(-2, -3);
Assert.AreEqual(-0.125, result);
}
示例7: TestExponential2
public void TestExponential2() {
var calc = new Calculator();
var result = calc.Exp(-2, 9);
Assert.AreEqual(-512, result);
}
示例8: TestExponentialNegativeBaseNegatveEvenExp
public void TestExponentialNegativeBaseNegatveEvenExp()
{
var calc = new Calculator();
var result = calc.Exp(-2, -10);
Assert.AreEqual(.0009765625, result);
}
示例9: TestExponentialPositiveOddExp
public void TestExponentialPositiveOddExp()
{
var calc = new Calculator();
var result = calc.Exp(2, -3);
Assert.AreEqual(.125, result);
}