Compare commits

..
2 Commits
Author SHA1 Message Date
wyj ea5ca0b679 update: add test 2025-11-06 17:04:09 -05:00
wyj c6560acb4c update: shift bmin 2025-11-06 17:03:45 -05:00
4 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -7,6 +7,6 @@
#define M (0.5*Rs)
#define R0 (15*Rs)
#define f(r) ((1.0-Rs/((double)r)))
#define bmin (1.5*sqrt(3.0))
#define bmin (1.5*sqrt(3.0))+1e-5
#define THETAERROR 100000
+5 -1
View File
@@ -123,7 +123,7 @@ static void refine_interval(double xl, double xr, double yl, double yr, double r
return ;
}
static int init(double bmax, double rela_err_limit){
int init(double bmax, double rela_err_limit){
SampleData sample;
sample.capacity = 2;
sample.size=2;
@@ -139,6 +139,10 @@ static int init(double bmax, double rela_err_limit){
//sort
//output
printf("Total sample points number: %d\n", sample.size);
for (int i = 0; i < sample.size; i++) {
printf("%.16g %.16g\n", sample.x[i], sample.y[i]);
}
free(sample.x);
free(sample.y);
+1
View File
@@ -1 +1,2 @@
double chi(double b);
int init(double bmax, double rela_err_limit);
+8
View File
@@ -0,0 +1,8 @@
#include "common.h"
#include "init.h"
int main(){
init(15.0, 1e-3);
return 0;
}