📄 wy__math.cpp
字号:
/* Copyright license: GNU LGPL (see file COPYING) by I.J.Wang (2004)*/#define WYLIB_SOURCE#include "wy__math.h"#include <cmath>double WyMath::_scif(double x, double& p10){ if(x<=0) { if(x==0) { return(p10=0.0); // return(0.0) } double frac=std::modf(std::log10(-x),&p10); if(frac<0) { frac+=1.0; p10-=1.0; } return(-std::pow(10.0,frac)); } else { double frac=std::modf(std::log10(x),&p10); if(frac<0) { frac+=1.0; p10-=1.0; } return(std::pow(10.0,frac)); }};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -