search for: r_strtod

Displaying 11 results from an estimated 11 matches for "r_strtod".

2024 Oct 08
1
WRE about R_strtod
Hello, This is what "Writing R extensions" currently says about R_atof and R_strtod: >> Function: void R_atof (const char* str) >> Function: void R_strtod (const char* str, char ** end) >> >> Implementations of the C99/POSIX functions atof and strtod which >> guarantee platform-dependent behaviour, including always using the >> period as the de...
2016 Dec 20
2
Very small numbers in hexadecimal notation parsed as zero
...in the three examples below: as.double("0x1.00000000d0000p-987") # should be 7.645296e-298 as.double("0x1.0000000000000p-1022") # should be 2.225074e-308 as.double("0x1.f89fc1a6f6613p-974") # should be 1.23456e-293 The culprit seems to be the src/main/util.c:R_strtod function and in some cases, removing the zeroes directly before the 'p' leads to correct parsing: as.double("0x1.00000000dp-987") # 7.645296e-298, as expected as.double("0x1.p-1022") # 2.225074e-308, as expected I wrote a small program (in a file called &...
2024 Jun 14
0
R 4.4.1 is released
...ION-INFO.dcf b4cb675deaaeb7299d3b265d218cde43f192951ce5b89b7bb1a5148a36b2d94d R-4/R-4.4.1.tar.gz fbd755314a5cc08c57aabff839ff791fb43a9052a2c6524ec3be96075fd34dde R-4/R-4.4.1.tar.xz This is the relevant part of the NEWS file CHANGES IN R 4.4.1: C-LEVEL FACILITIES: * Functions R_atof and R_strtod declared in header R_ext/Utils.h are now documented in 'Writing R Extensions' and so formally part of the API. * The non-API entry points Rf_setSVector, Rf_StringFalse, Rf_StringTrue and Rf_isBlankString have been added to those reported by R CMD check. * T...
2024 Jun 14
0
R 4.4.1 is released
...ION-INFO.dcf b4cb675deaaeb7299d3b265d218cde43f192951ce5b89b7bb1a5148a36b2d94d R-4/R-4.4.1.tar.gz fbd755314a5cc08c57aabff839ff791fb43a9052a2c6524ec3be96075fd34dde R-4/R-4.4.1.tar.xz This is the relevant part of the NEWS file CHANGES IN R 4.4.1: C-LEVEL FACILITIES: * Functions R_atof and R_strtod declared in header R_ext/Utils.h are now documented in 'Writing R Extensions' and so formally part of the API. * The non-API entry points Rf_setSVector, Rf_StringFalse, Rf_StringTrue and Rf_isBlankString have been added to those reported by R CMD check. * T...
2024 Jun 14
0
R 4.4.1 is released
...ION-INFO.dcf b4cb675deaaeb7299d3b265d218cde43f192951ce5b89b7bb1a5148a36b2d94d R-4/R-4.4.1.tar.gz fbd755314a5cc08c57aabff839ff791fb43a9052a2c6524ec3be96075fd34dde R-4/R-4.4.1.tar.xz This is the relevant part of the NEWS file CHANGES IN R 4.4.1: C-LEVEL FACILITIES: * Functions R_atof and R_strtod declared in header R_ext/Utils.h are now documented in 'Writing R Extensions' and so formally part of the API. * The non-API entry points Rf_setSVector, Rf_StringFalse, Rf_StringTrue and Rf_isBlankString have been added to those reported by R CMD check. * T...
2016 Dec 21
0
Very small numbers in hexadecimal notation parsed as zero
...t; as.double("0x1.00000000d0000p-987") # should be 7.645296e-298 > as.double("0x1.0000000000000p-1022") # should be 2.225074e-308 > as.double("0x1.f89fc1a6f6613p-974") # should be 1.23456e-293 > The culprit seems to be the src/main/util.c:R_strtod function and in > some cases, removing the zeroes directly before the 'p' leads to > correct parsing: > as.double("0x1.00000000dp-987") # 7.645296e-298, as expected > as.double("0x1.p-1022") # 2.225074e-308, as expected Yes, this loo...
2024 Apr 16
1
read.csv
Hum... This boils down to > as.numeric("1.23e") [1] 1.23 > as.numeric("1.23e-") [1] 1.23 > as.numeric("1.23e+") [1] 1.23 which in turn comes from this code in src/main/util.c (function R_strtod) if (*p == 'e' || *p == 'E') { int expsign = 1; switch(*++p) { case '-': expsign = -1; case '+': p++; default: ; } for (n = 0; *p >= '0' && *p <= '9'; p++) n = (n < MAX_EXPO...
2001 Aug 24
1
Reading Inf and NaN values under windows (PR#1072)
Under windows, R supports IEEE floating point arithmetic, but doesn't allow conversion of Inf and NaN from character to numeric. R> is.nan(NaN) [1] TRUE R> as.numeric(as.character(NaN)) [1] NA Warning message: NAs introduced by coercion R> is.infinite(Inf) [1] TRUE R> as.numeric(as.character(Inf)) [1] NA Warning message: NAs introduced by coercion whereas under Linux R>
2004 Mar 13
0
64bit build on IBM
...R_GlobalEnv ld: 0711-317 ERROR: Undefined symbol: .Rf_GetOption ld: 0711-317 ERROR: Undefined symbol: .Rf_asInteger ld: 0711-317 ERROR: Undefined symbol: R_NaInt ld: 0711-317 ERROR: Undefined symbol: .Rf_length ld: 0711-317 ERROR: Undefined symbol: .Rf_nthcdr ld: 0711-317 ERROR: Undefined symbol: .R_strtod ld: 0711-317 ERROR: Undefined symbol: .Rf_isBlankString ld: 0711-317 ERROR: Undefined symbol: R_NaReal ld: 0711-317 ERROR: Undefined symbol: .UNIMPLEMENTED ld: 0711-317 ERROR: Undefined symbol: .Rf_duplicate ld: 0711-317 ERROR: Undefined symbol: .R_ProtectWithIndex ld: 0711-317 ERROR: Undefined sym...
2024 Apr 16
5
read.csv
Dear R-developers, I came to a somewhat unexpected behaviour of read.csv() which is trivial but worthwhile to note -- my data involves a protein named "1433E" but to save space I drop the quote so it becomes, Gene,SNP,prot,log10p YWHAE,13:62129097_C_T,1433E,7.35 YWHAE,4:72617557_T_TA,1433E,7.73 Both read.cv() and readr::read_csv() consider prot(ein) name as (possibly confused by
2002 Jul 11
1
dyn.load tcl/tk (PR#1774)
.../readline/v4.2.1/include -c rbitmap.c -o rbitmap.lo /usr/bin/cc -shared -L/soft/readline/v4.2.1/lib -o R_X11.so dataentry.lo devX11.lo rotated.lo rbitmap.lo -lSM -lICE -lX11 -lreadline -ltermcap -lm ld: Warning: Unresolved: R_NaReal R_NaInt Rf_error Rf_warning UNIMPLEMENTED Rf_isBlankString R_strtod R_GlobalEnv R_NilValue R_NaString Rf_coerceVector Rf_PairToVectorList Rf_VectorToPairList Rf_allocString Rf_allocVector Rf_allocList Rf_asInteger Rf_duplicate Rf_GetOption Rf_install Rf_isList Rf_isVector Rf_length Rf_listAppend Rf_nthcdr Rf_PrintDefaults Rf_protect Rf_unprotect SET_STRING_ELT SET_...