From: Jean-Paul Pelteret Date: Sat, 30 Mar 2019 22:27:57 +0000 (+0100) Subject: Add test for symbolic math functions X-Git-Tag: v9.1.0-rc1~206^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe78e1db653e0ce71cc18f03bfc4cb761d2179f1;p=dealii.git Add test for symbolic math functions --- diff --git a/tests/symengine/symengine_number_type_02.cc b/tests/symengine/symengine_number_type_02.cc new file mode 100644 index 0000000000..a78a3e8118 --- /dev/null +++ b/tests/symengine/symengine_number_type_02.cc @@ -0,0 +1,492 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2019 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +// Check that the wrapper for symengine expressions can be used within +// math functions + +#include + +#include + +#include +#include +#include + +#include "../tests.h" + +using namespace dealii; +namespace SD = Differentiation::SD; +namespace SE = SymEngine; + +template +bool +same_number(const NumberType1 &val1, + const NumberType2 &val2, + const bool print = true, + const double tol_eps = 10.0) +{ + if (print == true) + std::cout << "Diff: " << std::abs(val1 - val2) << std::endl; + const long double eps1 = std::numeric_limits::epsilon(); + const long double eps2 = std::numeric_limits::epsilon(); + return std::abs(val1 - val2) <= tol_eps * std::max(eps1, eps2); +} + +template +void +test_number_functions() +{ + typedef SD::Expression SD_number_t; + typedef SE::RCP SE_double_t; + // typedef SD_number_t result_t; + typedef NumberType result_t; + typedef double float_result_t; + + // Primitive numbers + const NumberType x_(NumberType(2.2)); + const NumberType a_(NumberType(3.3)); + const NumberType b_(NumberType(-4.4)); + const NumberType inv_a_(NumberType(1.0 / a_)); + // Raw SymEngine number pointers + const SE_double_t x__(SE::real_double(x_)); + const SE_double_t a__(SE::real_double(a_)); + const SE_double_t b__(SE::real_double(b_)); + const SE_double_t inv_a__(SE::real_double(inv_a_)); + // Our wrapped numbers + const SD_number_t x(x_); + const SD_number_t a(a_); + const SD_number_t b(b_); + const SD_number_t inv_a(inv_a_); + + // SD_number_t f; // Temporary value; Check default constructor + // SD_number_t::substitution_map_t sub_vals; + + // --- Values --- + // NOTE: The returned results from SymEngineWrapper functions are actually + // symbolic in nature, so we cast them to the number in order to evaluate + // them. + + deallog.push("Power functions"); + { + deallog << "pow(a_,x_): " << std::pow(a_, x_) << std::endl; + deallog << "pow(a__,x__): " << *SE::pow(a__, x__) << std::endl; + deallog << "pow(a,x): " << static_cast(pow(a, x)) << std::endl; + deallog << "pow(a,x_): " << static_cast(pow(a, x_)) << std::endl; + deallog << "pow(a_,x): " << static_cast(pow(a_, x)) << std::endl; + Assert(same_number(static_cast(pow(a, x)), std::pow(a_, x_)), + ExcMessage("Incorrect result from pow function")); + // -------------- + deallog << "sqrt(a_): " << std::sqrt(a_) << std::endl; + deallog << "sqrt(a__): " << *SE::sqrt(a__) << std::endl; + deallog << "sqrt(a): " << sqrt(a) << std::endl; + deallog << "sqrt(a): " << static_cast(sqrt(a)) + << std::endl; + Assert(same_number(static_cast(sqrt(a)), std::sqrt(a_)), + ExcMessage("Incorrect result from sqrt function")); + // -------------- + deallog << "cbrt(a_): " << std::cbrt(a_) << std::endl; + deallog << "cbrt(a__): " << *SE::cbrt(a__) << std::endl; + deallog << "cbrt(a): " << cbrt(a) << std::endl; + deallog << "cbrt(a): " << static_cast(cbrt(a)) + << std::endl; + Assert(same_number(static_cast(cbrt(a)), std::cbrt(a_)), + ExcMessage("Incorrect result from cbrt function")); + // -------------- + deallog << "exp(a_): " << std::exp(a_) << std::endl; + deallog << "exp(a__): " << *SE::exp(a__) << std::endl; + deallog << "exp(a): " << exp(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "exp(a): " << static_cast(exp(a)) << std::endl; + Assert(same_number(static_cast(exp(a)), std::exp(a_)), + ExcMessage("Incorrect result from exp function")); + // -------------- + deallog << "log(a_): " << std::log(a_) << std::endl; + deallog << "log(a__): " << *SE::log(a__) << std::endl; + deallog << "log(a): " << log(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "log(a): " << static_cast(log(a)) << std::endl; + Assert(same_number(static_cast(log(a)), std::log(a_)), + ExcMessage("Incorrect result from log function")); + } + deallog.pop(); + + deallog.push("Other functions"); + { + deallog << "abs(b_): " << std::abs(b_) << std::endl; + deallog << "abs(b): " << static_cast(abs(b)) << std::endl; + Assert(same_number(static_cast(abs(b)), std::abs(b_)), + ExcMessage("Incorrect result from abs function")); + // -------------- + deallog << "copysign(1.0, b_): " << std::copysign(1.0, b_) << std::endl; + deallog << "sign(b): " << static_cast(sign(b)) << std::endl; + Assert(same_number(static_cast(sign(b)), std::copysign(1.0, b_)), + ExcMessage("Incorrect result from sign function")); + // -------------- + deallog << "copysign(a_, b_): " << std::copysign(a_, b_) << std::endl; + deallog << "copysign(a, b): " << static_cast(copysign(a, b)) + << std::endl; + Assert(same_number(static_cast(copysign(a, b)), + std::copysign(a_, b_)), + ExcMessage("Incorrect result from copysign function")); + // -------------- + deallog << "floor(b_): " << std::floor(b_) << std::endl; + deallog << "floor(b): " << static_cast(floor(b)) << std::endl; + Assert(same_number(static_cast(floor(b)), std::floor(b_)), + ExcMessage("Incorrect result from floor function")); + // -------------- + deallog << "ceil(b_): " << std::ceil(b_) << std::endl; + deallog << "ceil(b): " << static_cast(ceil(b)) << std::endl; + Assert(same_number(static_cast(ceil(b)), std::ceil(b_)), + ExcMessage("Incorrect result from ceil function")); + // -------------- + deallog << "max(a_,x_): " << std::max(a_, x_) << std::endl; + deallog << "max(a__,x__): " << *SE::max({a__, x__}) << std::endl; + deallog << "max(a,x): " << static_cast(max(a, x)) << std::endl; + deallog << "max(a,x_): " << static_cast(max(a, x_)) << std::endl; + deallog << "max(a_,x): " << static_cast(max(a_, x)) << std::endl; + Assert(same_number(static_cast(max(a, x)), std::max(a_, x_)), + ExcMessage("Incorrect result from max function")); + // -------------- + deallog << "min(a_,x_): " << std::min(a_, x_) << std::endl; + deallog << "min(a__,x__): " << *SE::min({a__, x__}) << std::endl; + deallog << "min(a,x): " << static_cast(min(a, x)) << std::endl; + deallog << "min(a,x_): " << static_cast(min(a, x_)) << std::endl; + deallog << "min(a_,x): " << static_cast(min(a_, x)) << std::endl; + Assert(same_number(static_cast(min(a, x)), std::min(a_, x_)), + ExcMessage("Incorrect result from max function")); + // -------------- + deallog << "erf(a_): " << std::erf(a_) << std::endl; + deallog << "erf(a__): " << *SE::erf(a__) << std::endl; + deallog << "erf(a): " << erf(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "erf(a): " << static_cast(erf(a)) << std::endl; + Assert(same_number(static_cast(erf(a)), std::erf(a_)), + ExcMessage("Incorrect result from erf function")); + // -------------- + deallog << "erfc(a_): " << std::erfc(a_) << std::endl; + deallog << "erfc(a__): " << *SE::erfc(a__) << std::endl; + deallog << "erfc(a): " << erfc(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "erfc(a): " << static_cast(erfc(a)) + << std::endl; + Assert(same_number(static_cast(erfc(a)), std::erfc(a_)), + ExcMessage("Incorrect result from erfc function")); + } + deallog.pop(); + + // References: + // https://en.wikipedia.org/wiki/Trigonometric_functions + // https://en.wikipedia.org/wiki/Hyperbolic_function + // http://mathworld.wolfram.com/InverseCosecant.html + deallog.push("Trig functions"); + { + deallog << "sin(a_): " << std::sin(a_) << std::endl; + deallog << "sin(a__): " << *SE::sin(a__) << std::endl; + deallog << "sin(a): " << sin(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "sin(a): " << static_cast(sin(a)) << std::endl; + Assert(same_number(static_cast(sin(a)), std::sin(a_)), + ExcMessage("Incorrect result from sin function")); + // -------------- + deallog << "cos(a_): " << std::cos(a_) << std::endl; + deallog << "cos(a__): " << *SE::cos(a__) << std::endl; + deallog << "cos(a): " << cos(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "cos(a): " << static_cast(cos(a)) << std::endl; + Assert(same_number(static_cast(cos(a)), std::cos(a_)), + ExcMessage("Incorrect result from cos function")); + // -------------- + deallog << "tan(a_): " << std::tan(a_) << std::endl; + deallog << "tan(a__): " << *SE::tan(a__) << std::endl; + deallog << "tan(a): " << tan(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "tan(a): " << static_cast(tan(a)) << std::endl; + Assert(same_number(static_cast(tan(a)), std::tan(a_)), + ExcMessage("Incorrect result from tan function")); + } + deallog.pop(); + + deallog.push("Reciprocal trig functions"); + { + deallog << "csc(a_): " << (NumberType(1.0) / std::sin(a_)) << std::endl; + deallog << "csc(a__): " << *SE::csc(a__) << std::endl; + deallog << "csc(a): " << csc(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "csc(a): " << static_cast(csc(a)) << std::endl; + Assert(same_number(static_cast(csc(a)), + (NumberType(1.0) / std::sin(a_))), + ExcMessage("Incorrect result from csc function")); + // -------------- + deallog << "sec(a_): " << (NumberType(1.0) / std::cos(a_)) << std::endl; + deallog << "sec(a__): " << *SE::sec(a__) << std::endl; + deallog << "sec(a): " << sec(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "sec(a): " << static_cast(sec(a)) << std::endl; + Assert(same_number(static_cast(sec(a)), + (NumberType(1.0) / std::cos(a_))), + ExcMessage("Incorrect result from sec function")); + // -------------- + deallog << "cot(a_): " << (NumberType(1.0) / std::tan(a_)) << std::endl; + deallog << "cot(a__): " << *SE::cot(a__) << std::endl; + deallog << "cot(a): " << cot(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "cot(a): " << static_cast(cot(a)) << std::endl; + Assert(same_number(static_cast(cot(a)), + (NumberType(1.0) / std::tan(a_))), + ExcMessage("Incorrect result from cot function")); + } + deallog.pop(); + + deallog.push("Inverse trig functions"); + { + deallog << "asin(inv_a_): " << std::asin(inv_a_) << std::endl; + deallog << "asin(inv_a__): " << *SE::asin(inv_a__) << std::endl; + deallog << "asin(inv_a): " << asin(inv_a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "asin(inv_a): " << static_cast(asin(inv_a)) + << std::endl; + Assert(same_number(static_cast(asin(inv_a)), + std::asin(inv_a_)), + ExcMessage("Incorrect result from asin function")); + // -------------- + deallog << "acos(inv_a_): " << std::acos(inv_a_) << std::endl; + deallog << "acos(inv_a__): " << *SE::acos(inv_a__) << std::endl; + deallog << "acos(inv_a): " << acos(inv_a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "acos(inv_a): " << static_cast(acos(inv_a)) + << std::endl; + Assert(same_number(static_cast(acos(inv_a)), + std::acos(inv_a_)), + ExcMessage("Incorrect result from acos function")); + // -------------- + deallog << "atan(inv_a_): " << std::atan(inv_a_) << std::endl; + deallog << "atan(inv_a__): " << *SE::atan(inv_a__) << std::endl; + deallog << "atan(inv_a): " << atan(inv_a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "atan(inv_a): " << static_cast(atan(inv_a)) + << std::endl; + Assert(same_number(static_cast(atan(inv_a)), + std::atan(inv_a_)), + ExcMessage("Incorrect result from atan function")); + // -------------- + deallog << "atan2(x_,a_): " << std::atan2(x_, a_) << std::endl; + deallog << "atan2(x__,a__): " << *SE::atan2(x__, a__) << std::endl; + deallog << "atan2(x,a): " << atan2(x, a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "atan2(x,a): " << static_cast(atan2(x, a)) + << std::endl; + Assert(same_number(static_cast(atan2(x, a)), + std::atan2(x_, a_)), + ExcMessage("Incorrect result from atan2 function")); + } + deallog.pop(); + + deallog.push("Reciprocal inverse trig functions"); + { + deallog << "acsc(a_): " << std::asin(NumberType(1.0) / a_) << std::endl; + deallog << "acsc(a__): " << *SE::acsc(a__) << std::endl; + deallog << "acsc(a): " << acsc(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "acsc(a): " << static_cast(acsc(a)) + << std::endl; + Assert(same_number(static_cast(acsc(a)), + std::asin(NumberType(1.0) / a_)), + ExcMessage("Incorrect result from acsc function")); + // -------------- + deallog << "asec(a_): " << std::acos(NumberType(1.0) / a_) << std::endl; + deallog << "asec(a__): " << *SE::asec(a__) << std::endl; + deallog << "asec(a): " << asec(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "asec(a): " << static_cast(asec(a)) + << std::endl; + Assert(same_number(static_cast(asec(a)), + std::acos(NumberType(1.0) / a_)), + ExcMessage("Incorrect result from asec function")); + // -------------- + deallog << "acot(a_): " << std::atan(NumberType(1.0) / a_) << std::endl; + deallog << "acot(a__): " << *SE::acot(a__) << std::endl; + deallog << "acot(a): " << acot(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "acot(a): " << static_cast(acot(a)) + << std::endl; + Assert(same_number(static_cast(acot(a)), + std::atan(NumberType(1.0) / a_)), + ExcMessage("Incorrect result from acot function")); + } + deallog.pop(); + + deallog.push("Hyperbolic trig functions"); + { + deallog << "sinh(a_): " << std::sinh(a_) << std::endl; + deallog << "sinh(a__): " << *SE::sinh(a__) << std::endl; + deallog << "sinh(a): " << sinh(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "sinh(a): " << static_cast(sinh(a)) + << std::endl; + Assert(same_number(static_cast(sinh(inv_a)), + std::sinh(inv_a_)), + ExcMessage("Incorrect result from sinh function")); + // -------------- + deallog << "cosh(a_): " << std::cosh(a_) << std::endl; + deallog << "cosh(a__): " << *SE::cosh(a__) << std::endl; + deallog << "cosh(a): " << cosh(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "cosh(a): " << static_cast(cosh(a)) + << std::endl; + Assert(same_number(static_cast(cosh(inv_a)), + std::cosh(inv_a_)), + ExcMessage("Incorrect result from cosh function")); + // -------------- + deallog << "tanh(a_): " << std::tanh(a_) << std::endl; + deallog << "tanh(a__): " << *SE::tanh(a__) << std::endl; + deallog << "tanh(a): " << tanh(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "tanh(a): " << static_cast(tanh(a)) + << std::endl; + Assert(same_number(static_cast(tanh(inv_a)), + std::tanh(inv_a_)), + ExcMessage("Incorrect result from tanh function")); + } + deallog.pop(); + + deallog.push("Reciprocal hyperbolic trig functions"); + { + deallog << "csch(a_): " << (NumberType(1.0) / std::sinh(a_)) << std::endl; + deallog << "csch(a__): " << *SE::csch(a__) << std::endl; + deallog << "csch(a): " << csch(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "csch(a): " << static_cast(csch(a)) + << std::endl; + Assert(same_number(static_cast(csch(a)), + (NumberType(1.0) / std::sinh(a_))), + ExcMessage("Incorrect result from csch function")); + // -------------- + deallog << "sech(a_): " << (NumberType(1.0) / std::cosh(a_)) << std::endl; + deallog << "sech(a__): " << *SE::sech(a__) << std::endl; + deallog << "sech(a): " << sech(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "sech(a): " << static_cast(sech(a)) + << std::endl; + Assert(same_number(static_cast(sech(a)), + (NumberType(1.0) / std::cosh(a_))), + ExcMessage("Incorrect result from sech function")); + // -------------- + deallog << "coth(a_): " << (NumberType(1.0) / std::tanh(a_)) << std::endl; + deallog << "coth(a__): " << *SE::coth(a__) << std::endl; + deallog << "coth(a): " << coth(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "coth(a): " << static_cast(coth(a)) + << std::endl; + Assert(same_number(static_cast(coth(a)), + (NumberType(1.0) / std::tanh(a_))), + ExcMessage("Incorrect result from coth function")); + } + deallog.pop(); + + deallog.push("Inverse hyperbolic trig functions"); + { + deallog << "asinh(inv_a_): " << std::asinh(inv_a_) << std::endl; + deallog << "asinh(inv_a__): " << *SE::asinh(inv_a__) << std::endl; + deallog << "asinh(inv_a): " << asinh(inv_a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "asinh(inv_a): " << static_cast(asinh(inv_a)) + << std::endl; + Assert(same_number(static_cast(asinh(inv_a)), + std::asinh(inv_a_)), + ExcMessage("Incorrect result from asinh function")); + // -------------- + deallog << "acosh(a_): " << std::acosh(a_) << std::endl; + deallog << "acosh(a__): " << *SE::acosh(a__) << std::endl; + deallog << "acosh(a): " << acosh(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "acosh(a): " << static_cast(acosh(a)) + << std::endl; + Assert(same_number(static_cast(acosh(a)), std::acosh(a_)), + ExcMessage("Incorrect result from acosh function")); + // -------------- + deallog << "atanh(inv_a_): " << std::atanh(inv_a_) << std::endl; + deallog << "atanh(inv_a__): " << *SE::atanh(inv_a__) << std::endl; + deallog << "atanh(inv_a): " << atanh(inv_a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "atanh(inv_a): " << static_cast(atanh(inv_a)) + << std::endl; + Assert(same_number(static_cast(atanh(inv_a)), + std::atanh(inv_a_)), + ExcMessage("Incorrect result from atanh function")); + } + deallog.pop(); + + deallog.push("Reciprocal inverse hyperbolic trig functions"); + { + deallog << "acsch(a_): " << std::asinh(NumberType(1.0) / a_) << std::endl; + deallog << "acsch(a__): " << *SE::acsch(a__) << std::endl; + deallog << "acsch(a): " << acsch(a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "acsch(a): " << static_cast(acsch(a)) + << std::endl; + Assert(same_number(static_cast(acsch(a)), + std::asinh(NumberType(1.0) / a_)), + ExcMessage("Incorrect result from acsch function")); + // -------------- + deallog << "asech(inv_a_): " << std::acosh(a_) << std::endl; + deallog << "asech(inv_a__): " << *SE::asech(inv_a__) << std::endl; + deallog << "asech(inv_a): " << asech(inv_a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "asech(inv_a): " << static_cast(asech(inv_a)) + << std::endl; + Assert(same_number(static_cast(asech(inv_a)), + std::acosh(a_)), + ExcMessage("Incorrect result from asech function")); + // -------------- + deallog << "acoth(a_): " << std::atanh(NumberType(1.0) / a_) << std::endl; + deallog << "acoth(a__): " << *SE::acoth(a__) << std::endl; + deallog << "acoth(a): " << acoth(inv_a) + << std::endl; // Returns a SymEngine function, not a number + deallog << "acoth(a): " << static_cast(acoth(a)) + << std::endl; + Assert(same_number(static_cast(acoth(a)), + std::atanh(NumberType(1.0) / a_)), + ExcMessage("Incorrect result from acoth function")); + } + deallog.pop(); +} + +int +main() +{ + initlog(); + + // Most of the functions tested return irrational values. Making a test + // work for both integer and floating point values is hard! + // deallog.push("Integer"); + // test_number_functions(); + + deallog.push("Float"); + test_number_functions(); + deallog.pop(); + + deallog.push("Double"); + test_number_functions(); + deallog.pop(); + + // Not available yet + // SymEngine::SymEngineException: Invalid Format: Expected Integer or Rational + // deallog.push("Complex double"); + // test_number_functions>(); + // deallog.pop(); + + deallog << "OK" << std::endl; +} diff --git a/tests/symengine/symengine_number_type_02.output b/tests/symengine/symengine_number_type_02.output new file mode 100644 index 0000000000..61f12a229a --- /dev/null +++ b/tests/symengine/symengine_number_type_02.output @@ -0,0 +1,300 @@ + +DEAL:Float:Power functions::pow(a_,x_): 13.8271 +DEAL:Float:Power functions::pow(a__,x__): 13.827086465678 +DEAL:Float:Power functions::pow(a,x): 13.8271 +DEAL:Float:Power functions::pow(a,x_): 13.8271 +DEAL:Float:Power functions::pow(a_,x): 13.8271 +DEAL:Float:Power functions::sqrt(a_): 1.81659 +DEAL:Float:Power functions::sqrt(a__): 1.81659019933398 +DEAL:Float:Power functions::sqrt(a): 1.81659019933398 +DEAL:Float:Power functions::sqrt(a): 1.81659 +DEAL:Float:Power functions::cbrt(a_): 1.48881 +DEAL:Float:Power functions::cbrt(a__): 1.48880554578294 +DEAL:Float:Power functions::cbrt(a): 1.48880554578294 +DEAL:Float:Power functions::cbrt(a): 1.48881 +DEAL:Float:Power functions::exp(a_): 27.1126 +DEAL:Float:Power functions::exp(a__): 27.1126376278265 +DEAL:Float:Power functions::exp(a): 27.1126376278265 +DEAL:Float:Power functions::exp(a): 27.1126 +DEAL:Float:Power functions::log(a_): 1.19392 +DEAL:Float:Power functions::log(a__): 1.19392245402282 +DEAL:Float:Power functions::log(a): 1.19392245402282 +DEAL:Float:Power functions::log(a): 1.19392 +DEAL:Float:Other functions::abs(b_): 4.40000 +DEAL:Float:Other functions::abs(b): 4.40000 +DEAL:Float:Other functions::copysign(1.0, b_): -1.00000 +DEAL:Float:Other functions::sign(b): -1.00000 +DEAL:Float:Other functions::copysign(a_, b_): -3.30000 +DEAL:Float:Other functions::copysign(a, b): -3.30000 +DEAL:Float:Other functions::floor(b_): -5.00000 +DEAL:Float:Other functions::floor(b): -5.00000 +DEAL:Float:Other functions::ceil(b_): -4.00000 +DEAL:Float:Other functions::ceil(b): -4.00000 +DEAL:Float:Other functions::max(a_,x_): 3.30000 +DEAL:Float:Other functions::max(a__,x__): 3.29999995231628 +DEAL:Float:Other functions::max(a,x): 3.30000 +DEAL:Float:Other functions::max(a,x_): 3.30000 +DEAL:Float:Other functions::max(a_,x): 3.30000 +DEAL:Float:Other functions::min(a_,x_): 2.20000 +DEAL:Float:Other functions::min(a__,x__): 2.20000004768372 +DEAL:Float:Other functions::min(a,x): 2.20000 +DEAL:Float:Other functions::min(a,x_): 2.20000 +DEAL:Float:Other functions::min(a_,x): 2.20000 +DEAL:Float:Other functions::erf(a_): 0.999997 +DEAL:Float:Other functions::erf(a__): 0.9999969422892 +DEAL:Float:Other functions::erf(a): 0.9999969422892 +DEAL:Float:Other functions::erf(a): 0.999997 +DEAL:Float:Other functions::erfc(a_): 3.05771e-06 +DEAL:Float:Other functions::erfc(a__): 3.05771079957068e-06 +DEAL:Float:Other functions::erfc(a): 3.05771079957068e-06 +DEAL:Float:Other functions::erfc(a): 3.05771e-06 +DEAL:Float:Trig functions::sin(a_): -0.157746 +DEAL:Float:Trig functions::sin(a__): -0.157745647056543 +DEAL:Float:Trig functions::sin(a): -0.157745647056543 +DEAL:Float:Trig functions::sin(a): -0.157746 +DEAL:Float:Trig functions::cos(a_): -0.987480 +DEAL:Float:Trig functions::cos(a__): -0.987479777430765 +DEAL:Float:Trig functions::cos(a): -0.987479777430765 +DEAL:Float:Trig functions::cos(a): -0.987480 +DEAL:Float:Trig functions::tan(a_): 0.159746 +DEAL:Float:Trig functions::tan(a__): 0.15974569875949 +DEAL:Float:Trig functions::tan(a): 0.15974569875949 +DEAL:Float:Trig functions::tan(a): 0.159746 +DEAL:Float:Reciprocal trig functions::csc(a_): -6.33932 +DEAL:Float:Reciprocal trig functions::csc(a__): -6.33931914229971 +DEAL:Float:Reciprocal trig functions::csc(a): -6.33931914229971 +DEAL:Float:Reciprocal trig functions::csc(a): -6.33932 +DEAL:Float:Reciprocal trig functions::sec(a_): -1.01268 +DEAL:Float:Reciprocal trig functions::sec(a__): -1.01267896604608 +DEAL:Float:Reciprocal trig functions::sec(a): -1.01267896604608 +DEAL:Float:Reciprocal trig functions::sec(a): -1.01268 +DEAL:Float:Reciprocal trig functions::cot(a_): 6.25995 +DEAL:Float:Reciprocal trig functions::cot(a__): 6.2599494557007 +DEAL:Float:Reciprocal trig functions::cot(a): 6.2599494557007 +DEAL:Float:Reciprocal trig functions::cot(a): 6.25995 +DEAL:Float:Inverse trig functions::asin(inv_a_): 0.307871 +DEAL:Float:Inverse trig functions::asin(inv_a__): 0.30787087787464 +DEAL:Float:Inverse trig functions::asin(inv_a): 0.30787087787464 +DEAL:Float:Inverse trig functions::asin(inv_a): 0.307871 +DEAL:Float:Inverse trig functions::acos(inv_a_): 1.26293 +DEAL:Float:Inverse trig functions::acos(inv_a__): 1.26292544892026 +DEAL:Float:Inverse trig functions::acos(inv_a): 1.26292544892026 +DEAL:Float:Inverse trig functions::acos(inv_a): 1.26293 +DEAL:Float:Inverse trig functions::atan(inv_a_): 0.294235 +DEAL:Float:Inverse trig functions::atan(inv_a__): 0.294234573382648 +DEAL:Float:Inverse trig functions::atan(inv_a): 0.294234573382648 +DEAL:Float:Inverse trig functions::atan(inv_a): 0.294235 +DEAL:Float:Inverse trig functions::atan2(x_,a_): 0.588003 +DEAL:Float:Inverse trig functions::atan2(x__,a__): atan2(2.20000004768372, 3.29999995231628) +DEAL:Float:Inverse trig functions::atan2(x,a): atan2(2.20000004768372, 3.29999995231628) +DEAL:Float:Inverse trig functions::atan2(x,a): 0.588003 +DEAL:Float:Reciprocal inverse trig functions::acsc(a_): 0.307871 +DEAL:Float:Reciprocal inverse trig functions::acsc(a__): 0.307870872992762 +DEAL:Float:Reciprocal inverse trig functions::acsc(a): 0.307870872992762 +DEAL:Float:Reciprocal inverse trig functions::acsc(a): 0.307871 +DEAL:Float:Reciprocal inverse trig functions::asec(a_): 1.26293 +DEAL:Float:Reciprocal inverse trig functions::asec(a__): 1.26292545380213 +DEAL:Float:Reciprocal inverse trig functions::asec(a): 1.26292545380213 +DEAL:Float:Reciprocal inverse trig functions::asec(a): 1.26293 +DEAL:Float:Reciprocal inverse trig functions::acot(a_): 0.294235 +DEAL:Float:Reciprocal inverse trig functions::acot(a__): 0.294234569121593 +DEAL:Float:Reciprocal inverse trig functions::acot(a): 0.294234569121593 +DEAL:Float:Reciprocal inverse trig functions::acot(a): 0.294235 +DEAL:Float:Hyperbolic trig functions::sinh(a_): 13.5379 +DEAL:Float:Hyperbolic trig functions::sinh(a__): 13.5378772293333 +DEAL:Float:Hyperbolic trig functions::sinh(a): 13.5378772293333 +DEAL:Float:Hyperbolic trig functions::sinh(a): 13.5379 +DEAL:Float:Hyperbolic trig functions::cosh(a_): 13.5748 +DEAL:Float:Hyperbolic trig functions::cosh(a__): 13.5747603984933 +DEAL:Float:Hyperbolic trig functions::cosh(a): 13.5747603984933 +DEAL:Float:Hyperbolic trig functions::cosh(a): 13.5748 +DEAL:Float:Hyperbolic trig functions::tanh(a_): 0.997283 +DEAL:Float:Hyperbolic trig functions::tanh(a__): 0.997282959840377 +DEAL:Float:Hyperbolic trig functions::tanh(a): 0.997282959840377 +DEAL:Float:Hyperbolic trig functions::tanh(a): 0.997283 +DEAL:Float:Reciprocal hyperbolic trig functions::csch(a_): 0.0738668 +DEAL:Float:Reciprocal hyperbolic trig functions::csch(a__): 0.0738668243964602 +DEAL:Float:Reciprocal hyperbolic trig functions::csch(a): 0.0738668243964602 +DEAL:Float:Reciprocal hyperbolic trig functions::csch(a): 0.0738668 +DEAL:Float:Reciprocal hyperbolic trig functions::sech(a_): 0.0736661 +DEAL:Float:Reciprocal hyperbolic trig functions::sech(a__): 0.0736661252681112 +DEAL:Float:Reciprocal hyperbolic trig functions::sech(a): 0.0736661252681112 +DEAL:Float:Reciprocal hyperbolic trig functions::sech(a): 0.0736661 +DEAL:Float:Reciprocal hyperbolic trig functions::coth(a_): 1.00272 +DEAL:Float:Reciprocal hyperbolic trig functions::coth(a__): 1.00272444257952 +DEAL:Float:Reciprocal hyperbolic trig functions::coth(a): 1.00272444257952 +DEAL:Float:Reciprocal hyperbolic trig functions::coth(a): 1.00272 +DEAL:Float:Inverse hyperbolic trig functions::asinh(inv_a_): 0.298574 +DEAL:Float:Inverse hyperbolic trig functions::asinh(inv_a__): 0.298574346656372 +DEAL:Float:Inverse hyperbolic trig functions::asinh(inv_a): 0.298574346656372 +DEAL:Float:Inverse hyperbolic trig functions::asinh(inv_a): 0.298574 +DEAL:Float:Inverse hyperbolic trig functions::acosh(a_): 1.86328 +DEAL:Float:Inverse hyperbolic trig functions::acosh(a__): 1.86327933599091 +DEAL:Float:Inverse hyperbolic trig functions::acosh(a): 1.86327933599091 +DEAL:Float:Inverse hyperbolic trig functions::acosh(a): 1.86328 +DEAL:Float:Inverse hyperbolic trig functions::atanh(inv_a_): 0.312853 +DEAL:Float:Inverse hyperbolic trig functions::atanh(inv_a__): 0.312852959826358 +DEAL:Float:Inverse hyperbolic trig functions::atanh(inv_a): 0.312852959826358 +DEAL:Float:Inverse hyperbolic trig functions::atanh(inv_a): 0.312853 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::acsch(a_): 0.298574 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::acsch(a__): 0.298574342203972 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::acsch(a): 0.298574342203972 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::acsch(a): 0.298574 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::asech(inv_a_): 1.86328 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::asech(inv_a__): 1.86327931988071 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::asech(inv_a): 1.86327931988071 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::asech(inv_a): 1.86328 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::acoth(a_): 0.312853 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::acoth(a__): 0.312852954703614 +DEAL:Float:Reciprocal inverse hyperbolic trig functions::acoth(a): 0.312852959826358 + 1.5707963267949*I +DEAL:Float:Reciprocal inverse hyperbolic trig functions::acoth(a): 0.312853 +DEAL:Double:Power functions::pow(a_,x_): 13.8271 +DEAL:Double:Power functions::pow(a__,x__): 13.8270861180441 +DEAL:Double:Power functions::pow(a,x): 13.8271 +DEAL:Double:Power functions::pow(a,x_): 13.8271 +DEAL:Double:Power functions::pow(a_,x): 13.8271 +DEAL:Double:Power functions::sqrt(a_): 1.81659 +DEAL:Double:Power functions::sqrt(a__): 1.81659021245849 +DEAL:Double:Power functions::sqrt(a): 1.81659021245849 +DEAL:Double:Power functions::sqrt(a): 1.81659 +DEAL:Double:Power functions::cbrt(a_): 1.48881 +DEAL:Double:Power functions::cbrt(a__): 1.48880555295383 +DEAL:Double:Power functions::cbrt(a): 1.48880555295383 +DEAL:Double:Power functions::cbrt(a): 1.48881 +DEAL:Double:Power functions::exp(a_): 27.1126 +DEAL:Double:Power functions::exp(a__): 27.1126389206579 +DEAL:Double:Power functions::exp(a): 27.1126389206579 +DEAL:Double:Power functions::exp(a): 27.1126 +DEAL:Double:Power functions::log(a_): 1.19392 +DEAL:Double:Power functions::log(a__): 1.19392246847243 +DEAL:Double:Power functions::log(a): 1.19392246847243 +DEAL:Double:Power functions::log(a): 1.19392 +DEAL:Double:Other functions::abs(b_): 4.40000 +DEAL:Double:Other functions::abs(b): 4.40000 +DEAL:Double:Other functions::copysign(1.0, b_): -1.00000 +DEAL:Double:Other functions::sign(b): -1.00000 +DEAL:Double:Other functions::copysign(a_, b_): -3.30000 +DEAL:Double:Other functions::copysign(a, b): -3.30000 +DEAL:Double:Other functions::floor(b_): -5.00000 +DEAL:Double:Other functions::floor(b): -5.00000 +DEAL:Double:Other functions::ceil(b_): -4.00000 +DEAL:Double:Other functions::ceil(b): -4.00000 +DEAL:Double:Other functions::max(a_,x_): 3.30000 +DEAL:Double:Other functions::max(a__,x__): 3.3 +DEAL:Double:Other functions::max(a,x): 3.30000 +DEAL:Double:Other functions::max(a,x_): 3.30000 +DEAL:Double:Other functions::max(a_,x): 3.30000 +DEAL:Double:Other functions::min(a_,x_): 2.20000 +DEAL:Double:Other functions::min(a__,x__): 2.2 +DEAL:Double:Other functions::min(a,x): 2.20000 +DEAL:Double:Other functions::min(a,x_): 2.20000 +DEAL:Double:Other functions::min(a_,x): 2.20000 +DEAL:Double:Other functions::erf(a_): 0.999997 +DEAL:Double:Other functions::erf(a__): 0.999996942290204 +DEAL:Double:Other functions::erf(a): 0.999996942290204 +DEAL:Double:Other functions::erf(a): 0.999997 +DEAL:Double:Other functions::erfc(a_): 3.05771e-06 +DEAL:Double:Other functions::erfc(a__): 3.05770979643816e-06 +DEAL:Double:Other functions::erfc(a): 3.05770979643816e-06 +DEAL:Double:Other functions::erfc(a): 3.05771e-06 +DEAL:Double:Trig functions::sin(a_): -0.157746 +DEAL:Double:Trig functions::sin(a__): -0.157745694143248 +DEAL:Double:Trig functions::sin(a): -0.157745694143248 +DEAL:Double:Trig functions::sin(a): -0.157746 +DEAL:Double:Trig functions::cos(a_): -0.987480 +DEAL:Double:Trig functions::cos(a__): -0.987479769908865 +DEAL:Double:Trig functions::cos(a): -0.987479769908865 +DEAL:Double:Trig functions::cos(a): -0.987480 +DEAL:Double:Trig functions::tan(a_): 0.159746 +DEAL:Double:Trig functions::tan(a__): 0.159745747660032 +DEAL:Double:Trig functions::tan(a): 0.159745747660032 +DEAL:Double:Trig functions::tan(a): 0.159746 +DEAL:Double:Reciprocal trig functions::csc(a_): -6.33932 +DEAL:Double:Reciprocal trig functions::csc(a__): -6.33931725002842 +DEAL:Double:Reciprocal trig functions::csc(a): -6.33931725002842 +DEAL:Double:Reciprocal trig functions::csc(a): -6.33932 +DEAL:Double:Reciprocal trig functions::sec(a_): -1.01268 +DEAL:Double:Reciprocal trig functions::sec(a__): -1.01267897375993 +DEAL:Double:Reciprocal trig functions::sec(a): -1.01267897375993 +DEAL:Double:Reciprocal trig functions::sec(a): -1.01268 +DEAL:Double:Reciprocal trig functions::cot(a_): 6.25995 +DEAL:Double:Reciprocal trig functions::cot(a__): 6.25994753943736 +DEAL:Double:Reciprocal trig functions::cot(a): 6.25994753943736 +DEAL:Double:Reciprocal trig functions::cot(a): 6.25995 +DEAL:Double:Inverse trig functions::asin(inv_a_): 0.307871 +DEAL:Double:Inverse trig functions::asin(inv_a__): 0.307870868398053 +DEAL:Double:Inverse trig functions::asin(inv_a): 0.307870868398053 +DEAL:Double:Inverse trig functions::asin(inv_a): 0.307871 +DEAL:Double:Inverse trig functions::acos(inv_a_): 1.26293 +DEAL:Double:Inverse trig functions::acos(inv_a__): 1.26292545839684 +DEAL:Double:Inverse trig functions::acos(inv_a): 1.26292545839684 +DEAL:Double:Inverse trig functions::acos(inv_a): 1.26293 +DEAL:Double:Inverse trig functions::atan(inv_a_): 0.294235 +DEAL:Double:Inverse trig functions::atan(inv_a__): 0.294234565111188 +DEAL:Double:Inverse trig functions::atan(inv_a): 0.294234565111188 +DEAL:Double:Inverse trig functions::atan(inv_a): 0.294235 +DEAL:Double:Inverse trig functions::atan2(x_,a_): 0.588003 +DEAL:Double:Inverse trig functions::atan2(x__,a__): atan2(2.2, 3.3) +DEAL:Double:Inverse trig functions::atan2(x,a): atan2(2.2, 3.3) +DEAL:Double:Inverse trig functions::atan2(x,a): 0.588003 +DEAL:Double:Reciprocal inverse trig functions::acsc(a_): 0.307871 +DEAL:Double:Reciprocal inverse trig functions::acsc(a__): 0.307870868398053 +DEAL:Double:Reciprocal inverse trig functions::acsc(a): 0.307870868398053 +DEAL:Double:Reciprocal inverse trig functions::acsc(a): 0.307871 +DEAL:Double:Reciprocal inverse trig functions::asec(a_): 1.26293 +DEAL:Double:Reciprocal inverse trig functions::asec(a__): 1.26292545839684 +DEAL:Double:Reciprocal inverse trig functions::asec(a): 1.26292545839684 +DEAL:Double:Reciprocal inverse trig functions::asec(a): 1.26293 +DEAL:Double:Reciprocal inverse trig functions::acot(a_): 0.294235 +DEAL:Double:Reciprocal inverse trig functions::acot(a__): 0.294234565111188 +DEAL:Double:Reciprocal inverse trig functions::acot(a): 0.294234565111188 +DEAL:Double:Reciprocal inverse trig functions::acot(a): 0.294235 +DEAL:Double:Hyperbolic trig functions::sinh(a_): 13.5379 +DEAL:Double:Hyperbolic trig functions::sinh(a__): 13.5378778766283 +DEAL:Double:Hyperbolic trig functions::sinh(a): 13.5378778766283 +DEAL:Double:Hyperbolic trig functions::sinh(a): 13.5379 +DEAL:Double:Hyperbolic trig functions::cosh(a_): 13.5748 +DEAL:Double:Hyperbolic trig functions::cosh(a__): 13.5747610440296 +DEAL:Double:Hyperbolic trig functions::cosh(a): 13.5747610440296 +DEAL:Double:Hyperbolic trig functions::cosh(a): 13.5748 +DEAL:Double:Hyperbolic trig functions::tanh(a_): 0.997283 +DEAL:Double:Hyperbolic trig functions::tanh(a__): 0.997282960099142 +DEAL:Double:Hyperbolic trig functions::tanh(a): 0.997282960099142 +DEAL:Double:Hyperbolic trig functions::tanh(a): 0.997283 +DEAL:Double:Reciprocal hyperbolic trig functions::csch(a_): 0.0738668 +DEAL:Double:Reciprocal hyperbolic trig functions::csch(a__): 0.0738668208646195 +DEAL:Double:Reciprocal hyperbolic trig functions::csch(a): 0.0738668208646195 +DEAL:Double:Reciprocal hyperbolic trig functions::csch(a): 0.0738668 +DEAL:Double:Reciprocal hyperbolic trig functions::sech(a_): 0.0736661 +DEAL:Double:Reciprocal hyperbolic trig functions::sech(a__): 0.0736661217649808 +DEAL:Double:Reciprocal hyperbolic trig functions::sech(a): 0.0736661217649808 +DEAL:Double:Reciprocal hyperbolic trig functions::sech(a): 0.0736661 +DEAL:Double:Reciprocal hyperbolic trig functions::coth(a_): 1.00272 +DEAL:Double:Reciprocal hyperbolic trig functions::coth(a__): 1.00272444231935 +DEAL:Double:Reciprocal hyperbolic trig functions::coth(a): 1.00272444231935 +DEAL:Double:Reciprocal hyperbolic trig functions::coth(a): 1.00272 +DEAL:Double:Inverse hyperbolic trig functions::asinh(inv_a_): 0.298574 +DEAL:Double:Inverse hyperbolic trig functions::asinh(inv_a__): 0.298574338013478 +DEAL:Double:Inverse hyperbolic trig functions::asinh(inv_a): 0.298574338013478 +DEAL:Double:Inverse hyperbolic trig functions::asinh(inv_a): 0.298574 +DEAL:Double:Inverse hyperbolic trig functions::acosh(a_): 1.86328 +DEAL:Double:Inverse hyperbolic trig functions::acosh(a__): 1.86327935115345 +DEAL:Double:Inverse hyperbolic trig functions::acosh(a): 1.86327935115345 +DEAL:Double:Inverse hyperbolic trig functions::acosh(a): 1.86328 +DEAL:Double:Inverse hyperbolic trig functions::atanh(inv_a_): 0.312853 +DEAL:Double:Inverse hyperbolic trig functions::atanh(inv_a__): 0.312852949882206 +DEAL:Double:Inverse hyperbolic trig functions::atanh(inv_a): 0.312852949882206 +DEAL:Double:Inverse hyperbolic trig functions::atanh(inv_a): 0.312853 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::acsch(a_): 0.298574 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::acsch(a__): 0.298574338013478 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::acsch(a): 0.298574338013478 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::acsch(a): 0.298574 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::asech(inv_a_): 1.86328 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::asech(inv_a__): 1.86327935115345 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::asech(inv_a): 1.86327935115345 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::asech(inv_a): 1.86328 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::acoth(a_): 0.312853 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::acoth(a__): 0.312852949882206 +DEAL:Double:Reciprocal inverse hyperbolic trig functions::acoth(a): 0.312852949882206 + 1.5707963267949*I +DEAL:Double:Reciprocal inverse hyperbolic trig functions::acoth(a): 0.312853 +DEAL::OK