From ripley at stats.ox.ac.uk  Tue Jun 30 19:35:20 2015
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 30 Jun 2015 18:35:20 +0100
Subject: [Rd] Why doesn't R have a float data type?
In-Reply-To: <CAKxd1KM9Ktmh3Aa_bYpbA1w3xAY=ZWpStLmzGhduYfzFZf_OeA@mail.gmail.com>
References: <CAKxd1KM9Ktmh3Aa_bYpbA1w3xAY=ZWpStLmzGhduYfzFZf_OeA@mail.gmail.com>
Message-ID: <5592D358.1000506@stats.ox.ac.uk>

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.

>
> Regards,
> Charles


-- 
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



[Rd] Why doesn't R have a float data type?
Prof Brian Ripley