Geant4
10.03.p01
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
nf_stringToDoubles_main.cc
Go to the documentation of this file.
1
/*
2
# <<BEGIN-copyright>>
3
# <<END-copyright>>
4
*/
5
6
#include <stdio.h>
7
#include <stdlib.h>
8
#include <string.h>
9
10
#include "
nf_utilities.h
"
11
12
#if defined __cplusplus
13
namespace
GIDI {
14
using namespace
GIDI;
15
#endif
16
/*
17
char str[] = "1e-5 20.43634 2e-5 20.43634 5e-5 20.43634 1e-4 20.43633 2e-4 20.43633 5e-4 20.43633 1e-3 20.43633 2e-3 20.43633 5e-3 20.43633 " \
18
"1e-2 20.43633 0.0253 20.43633 5e-2 20.43633 0.1 20.43632 0.2 20.43631 0.5 20.43627 1 20.4362 2 20.43606 5 20.43566 10 20.43499 20" \
19
" 20.43364 50 20.4296 1e2 20.42288 2e2 20.40944 5e2 20.36926 1e3 20.30269 2e3 20.17105 4e3 19.91352 6e3 19.66341 8e3 19.4204 1e4 " \
20
"19.18418 1.5e4 18.62156 2e4 18.09567 4e4 16.29554 6e4 14.86728 8e4 13.70583 1e5 12.74229 1.5e5 10.9234 2e5 9.643178 3e5 7.951949 " \
21
"4e5 6.876412 5e5 6.125445 6e5 5.566879 7e5 5.13201 8e5 4.78157 9e5 4.491471 1e6 4.246104 1.2e6 3.850454 1.4e6 3.541748 1.6e6 3.291314 "
22
" 1.8e6 3.082187 2e6 2.903645 2.2e6 2.748543 2.4e6 2.611918 2.6e6 2.490197 2.8e6 2.380736 3e6 2.281521 3.2e6 2.190993 3.4e6 2.107917 3.6e6 " \
23
"2.031301 3.8e6 1.960334 4e6 1.894349 4.2e6 1.832787 4.4e6 1.775177 4.6e6 1.721118 4.8e6 1.670264 5e6 1.622318 5.5e6 1.513553 6e6 1.418157 " \
24
"6.5e6 1.333709 7e6 1.258367 7.5e6 1.190697 8e6 1.129564 8.5e6 1.074052 9e6 1.023415 9.5e6 0.9770347 1e7 0.9343974 1.05e7 0.8950685 1.1e7 " \
25
"0.8586796 1.15e7 0.8249154 1.2e7 0.7935044 1.25e7 0.7642113 1.3e7 0.7368313 1.35e7 0.7111848 1.4e7 0.6871141 1.45e7 0.6644799 1.5e7 0.6431586 " \
26
"1.55e7 0.6230401 1.6e7 0.6040262 1.65e7 0.586029 1.7e7 0.5689692 1.75e7 0.5527757 1.8e7 0.537384 1.85e7 0.5227359 1.9e7 0.5087783 1.95e7 0.495463 " \
27
"2e7 0.4827462 ";
28
*/
29
30
/*
31
========================================================================
32
*/
33
/*
34
int main( int argc, char **argv ) {
35
36
int64_t i1, numberConverted;
37
double *doublePtr;
38
nfu_status status;
39
char *endCharacter;
40
41
status = nfu_stringToListOfDoubles( str, &numberConverted, &doublePtr, &endCharacter );
42
if( doublePtr != NULL ) {
43
for( i1 = 0; i1 < numberConverted; i1++ ) printf( "%6d %14.7e\n", (int) i1, doublePtr[i1] );
44
nfu_free( doublePtr );
45
}
46
printf( "No converted = <%s>\n", endCharacter );
47
printf( "%8d %d\n", (int) numberConverted, status );
48
printf( "%s\n", nfu_statusMessage( status ) );
49
exit( EXIT_SUCCESS );
50
}
51
*/
52
53
#if defined __cplusplus
54
}
55
#endif
nf_utilities.h
geant4.10.03.p01
source
processes
hadronic
models
lend
src
nf_stringToDoubles_main.cc
Generated on Thu Mar 16 2017 22:38:11 for Geant4 by
1.8.5