Skip to content

Commit a1bf689

Browse files
committed
Reapply edit to SSTRF functions and update version to 0.1.4
1 parent 9c9adaa commit a1bf689

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

include/read.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ using namespace std;
2222

2323
//#define A2B 1.8897261
2424

25+
string SSTRF(float x);
26+
string SSTRF2(double x);
27+
2528
vector<string> split1(const string &s, char delim);
2629

2730
int check_file(string filename);

pixi.lock

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ preview = ["pixi-build"]
55

66
[package]
77
name = "slatergpu"
8-
version = "0.1.2"
8+
version = "0.1.4"
99

1010
[package.build]
1111
# backend = { name = "pixi-build-cmake", version = "*" }

recipe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
context:
2-
version: "0.1.2"
2+
version: "0.1.4"
33

44
package:
55
name: slatergpu

src/libio/read.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,24 @@
2121
#include "read.h"
2222

2323
#include <sstream>
24-
#define SSTRF( x ) static_cast< std::ostringstream & >( ( std::ostringstream() << fixed << setprecision(14) << x ) ).str()
25-
//#define SSTRF2( x ) static_cast< std::ostringstream & >( ( std::ostringstream() << fixed << setprecision(4) << x ) ).str()
2624

2725
double norm(int n, int l, int m, double zeta);
2826

2927
#define A2B 1.8897261
3028

29+
string SSTRF(float x)
30+
{
31+
std::ostringstream ss;
32+
ss << std::fixed << std::setprecision(8) << std::scientific << (x);
33+
return ss.str();
34+
}
35+
36+
string SSTRF2(double x)
37+
{
38+
std::ostringstream ss;
39+
ss << std::fixed << std::setprecision(14) << std::scientific << (x);
40+
return ss.str();
41+
}
3142

3243
int check_file(string filename)
3344
{

src/libio/write.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#include "write.h"
22

33
#include <sstream>
4-
#define SSTRF( x ) static_cast< std::ostringstream & >( ( std::ostringstream() << fixed << setprecision(8) << scientific << x ) ).str()
5-
#define SSTRF2( x ) static_cast< std::ostringstream & >( ( std::ostringstream() << fixed << setprecision(14) << scientific << x ) ).str()
6-
//#define SSTRF( x ) static_cast< std::ostringstream & >( ( std::ostringstream() << fixed << setprecision(8) << x ) ).str()
7-
//#define SSTRF2( x ) static_cast< std::ostringstream & >( ( std::ostringstream() << fixed << setprecision(14) << x ) ).str()
84

95
#define A2B 1.8897261
106

0 commit comments

Comments
 (0)