OpenersNotesSection(Spacer1)Details

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 (RefLink[RealDigits, paclet:ref/RealDigits]) to generate lists of digits, then calling (NonWLLink[MLGetIntegerList(), paclet:ref/c/MLGetIntegerList]).

MLGetReal() is normally equivalent to (NonWLLink[MLGetDouble(), paclet:ref/c/MLGetDouble]) and (NonWLLink[MLGetReal64(), paclet:ref/c/MLGetReal64]).

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLGetFloat(), paclet:ref/c/MLGetFloat])  ▪  (NonWLLink[MLGetDouble(), paclet:ref/c/MLGetDouble])  ▪  (NonWLLink[MLGetRealList(), paclet:ref/c/MLGetRealList])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Handling Lists, Arrays and Other Expressions, paclet:tutorial/HandlingListsArraysAndOtherExpressions])}, {▪(RefLinkPlain[Manipulating Expressions in External Programs, paclet:tutorial/ManipulatingExpressionsInExternalPrograms])}})}})