18 NumericFunctions

18 NumericFunctions - Mathematical And Numeric Functions 1...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
July 07 1 Mathematical And Numeric Functions
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
July 07 2 Math Functions Name Description Abs() Absolute value |x| Sqrt() Square root c The functions are part of the Math class library so you will need to precede the function name with the class name Math and a dot operator (.) as in Math.Sqrt() and Math.Abs(). c For the Sqrt() function the argument should be positive c The Abs() function returns x if x is positive and -x if x is negative
Background image of page 2
July 07 3 Logarithmic Functions Function Description Exp Exponential e x Log Natural logarithm c For the Exp() function the argument can be positive, negative, or zero. c The largest value of the argument of the Exp() function depends on the numeric data type. If argument is double- precision, the upper limit is 709. If single- precision the upper limit is 88.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
July 07 4 Logarithmic Functions y = Math.Exp(x) y = Math.Exp(-15.5) c The argument for the Log() function must be positive y = Math.Log(x) y = Math.Log(2.5) c For integers, single or currency values, the Log() and Exp() functions calculate results in single precision
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 14

18 NumericFunctions - Mathematical And Numeric Functions 1...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online