[Rd] Why doesn't R have a float data type?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jun 30 19:35:20 CEST 2015
On 30/06/2015 17:42, Charles Determan wrote:
> This is strictly a curiosity question. I am aware the R doesn't possess a
> float data type. I also don't mean to request that such functionality be
> implemented as I'm sure it would require a large amount of work with
> potential back compatibility conflicts. But I wanted to know why R has
> never had a float data type available?
You said it:
'it would require a large amount of work'
and not just for R but also for many packages that users would expect to
support data in that format.
By the time R started to spread (late 90s), most FPUs were primarily
double/extended precision and there was little or no speed advantage to
single-precision calculations. And although S[-PLUS] had a 'single'
type, we knew it was little used by then.
For a few people the storage size may matter (and for others the 32-bit
logicals are wasteful): although for most people RAM is cheap enough,
there are packages such as 'ff' which address this.
Brian D. Ripley, ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK
More information about the R-devel