|
SOLUTIONS
|
MATHEMATICA MATHLINK C 函数
MLPutReal128()
int MLPutReal128(MLINK link, mlextended_double d)
把扩展精度的浮点数 d 写入由 link 指定的 MathLink 连接.
更多信息更多信息
- MLPutReal128() 在错误事件中返回0,如果函数成功则返回非零值.
- 如果 MLPutReal128() 失败,则使用 MLError() 检索错误代码.
- MLPutReal128() 在 MathLink 标头文件 mathlink.h 中被声明.
范例范例打开所有单元关闭所有单元
基本范例 (1)基本范例 (1)
#include "mathlink.h"
/* put the expression Sqrt[2.70001] to a link */
void f(MLINK lp)
{
if(! MLPutFunction(lp, "Sqrt", 1))
{ /* unable to put Sqrt[] to lp */ }
if(! MLPutReal128(lp, 2.70001))
{ /* unable to put 2.70001 to lp */ }
if(! MLEndPacket(lp))
{ /* unable to put the end-of-packet sequence to lp */ }
if(! MLFlush(lp))
{ /* unable to flush any output buffered in lp */ }
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
