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] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  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
 56