|
SOLUTIONS
|
MATHEMATICA MATHLINK C 関数
MLPutReal128()
int MLPutReal128(MLINK link, mlextended_double d)
拡張精度浮動小数点数d をlink で指定されたMathLink 接続に置く.
詳細詳細
- MLPutReal128()はエラーがあると0を返し,それ以外の場合には0以外の値を返す.
- MLError()を使うと,MLPutReal128()が不成功の場合にエラーコードを引き出すことができる.
- 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 »
