This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / The Mathematica Book / Reference Guide / Listing of C Functions in the MathLink Library  /
MLGetReal()

  • intMLGetReal(MLINKlink,double*x) gets a floating-point number from the MathLink connection specified by link and stores it in x.
  • If the data on the link corresponds to an integer, MLGetReal() will coerce it to a double before storing it in x.
  • If the data on the link corresponds to a number outside the range that can be stored in a C double on your computer system, then MLGetReal() will fail, and return 0.
  • You can get arbitrary-precision real numbers by first using RealDigits to generate lists of digits, then calling MLGetIntegerList().
  • MLGetReal() is normally equivalent to MLGetDouble().
  • See the Mathematica book: Section 2.12.4.
  • See also: MLGetFloatMLGetFloatMainBookLinkOldButtonDataMLGetFloat, MLGetDoubleMLGetDoubleMainBookLinkOldButtonDataMLGetDouble, MLGetRealListMLGetRealListMainBookLinkOldButtonDataMLGetRealList.