- /* sdmsLdbl.cpp by K.Tsuru */
- // function ID = 303 DRADIX since version 2.31
- /******************************************************************
- SDouble class
- It sets a value by long double, including long, etc.
- via std::stringstream and StringToNumber class.
- ********************************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- static const char* const func = "SetLongDouble";
- void SDouble::SetLongDouble(ldouble ld){
- if(ld == 0.0){
- if(RawSign()) SetZero();
- return; // d = 0, sign = 0
- }
- if(Type() == BIN_DEC) SetError(RADIX_ERR, func, 303);
-
- stringstream ss;
-
- ss << setprecision(LDBL_DIG+2) << ld;
- string temp = (string)ss.str();
- SetString(temp.c_str());
- }
-
sdmsLdbl.cpp : last modifiled at 2017/08/28 11:48:01(738 bytes)
created at 2017/10/07 10:21:15
The creation time of this html file is 2017/10/07 10:30:03 (Sat Oct 07 10:30:03 2017).