我尝试了以下代码:
# include <stdio.h>
# include <gsl/gsl_sf_bessel.h>
int main (void)
{
double x = 5.0;
double y = gsl_sf_bessel_j0 (x);
printf ("JO(%g) = %.18e\n", x , y);
return(0);
}
我得到的结果是:
JO(5) = -1.917848549326277019e-01
GSL手册中给出的结果是
-1.775967713143382920e-01
知道出了什么问题吗?
答案 0 :(得分:0)
在我看来,这的确像个虫子。根据{{3}},我似乎尚未修复它。但是,有两个可能的原因:
buildscript {
ext {
springBootVersion = '2.0.3.RELEASE'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "o.s.b:spring-boot-gradle-plugin:${springBootVersion}"
}
}
allprojects {
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
group = 'net.hemisoft.financial.calculator'
version = "0.1.0-SNAPSHOT"
}
subprojects {
apply plugin: 'groovy'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'o.c.g:groovy'
testCompile 'o.s.b:spring-boot-starter-test'
}
dependencyManagement {
imports { mavenBom("o.s.b:spring-boot-dependencies:${springBootVersion}") }
}
}
project(rootProject.name + '-library') {
dependencies {
compile 'o.s.b:spring-boot-starter'
}
}
project(rootProject.name + '-api') {
dependencies {
compile project (':' + rootProject.name + '-library')
compile 'o.s.b:spring-boot-starter-web'
}
}
足够接近所需的答案(不过我不确定精度)。无论如何,由于没有报告,所以我提交了一个错误报告。我确实计划在收到与此问题有关的任何信息后立即更新此答案。