Csound Csound-dev Csound-tekno Search About

Precision vs Implementation

Date1999-06-07 22:32
FromAnders Andersson
SubjectPrecision vs Implementation
A very important question is:

Is it POSSIBLE to change all the floats to doubles??

Who is going to do this?



Vote: Double as default/Only alternative.
      maybe floats as compile-time directive.

I use CSound for realtime about 1% of the time I use CSound.


// Anders







A very nice thing with CSound is that you can create sounds that utilize the
whole
audible spectrum in 192kHz.. =)

If we only would change the resolution to doubles too.. =)

Date1999-06-07 23:17
FromEd Hall
SubjectRe: Precision vs Implementation
Anders Andersson  wrote:

> A very important question is:
> 
> Is it POSSIBLE to change all the floats to doubles??

Yes, it's almost just a global change of "float" to "double".  There are
a few cases where it is assumed that the internal sample size is 4 bytes,
mostly in the orchestra-loading code.  And there are cases where it is
assumed that a sample is sizeof(long) and/or sizeof(void*).  So it isn't
trivial, but it wouldn't take long for someone familiar with the code.
These are all areas I had to go over to get Csound working on 64-bit CPU's.

> Who is going to do this?

Not me; I'd much rather see a more targeted approach which can use 32-bit
floats for tables, delays, and so on, and 64-bit doubles for calculations.
I won't have time to even look at this until Fall, but I might well wind
up doing it if someone else doesn't.

		-Ed