Csound Csound-dev Csound-tekno Search About

Re: New versions.

Date1997-04-21 16:18
FromToby
SubjectRe: New versions.
> >We made a change in the swrite.c file in order
> >to make csound print out the correct size values
> >for F tables larger than 2^22. 

> >Richard Karpen


I looked at the function 'fltout()' in swrite.c which
is the one that has comments about changes by Richard
Karpen.  I snipped this code out and put it into a
test program, passing it random floats.  It returned
very close output to input; things like 23.454543 going
in, and 23.4545431 going out.  However, integral values
came back correctly.  This made me think that it may
not be this function which is responsible for the
table size errors under Linux.  I don't know much about
the sources.  Where would I look to find out from
which function the table sizes are passed to fltout()?

Toby

	-There otta be a law-

Date1997-04-21 18:36
FromEli Brandt
SubjectRe: New versions.
Toby wrote:
> I looked at the function 'fltout()' in swrite.c which
> is the one that has comments about changes by Richard
> Karpen.  I snipped this code out and put it into a
> test program, passing it random floats.  It returned
> very close output to input; things like 23.454543 going
> in, and 23.4545431 going out.  However, integral values
> came back correctly.

Uninformed guess: it's apparently using floats internally (why?);
maybe it's munging them a little and then expecting printf("%g") to
clean them up.  As a quick kludge, try rounding the value immediately
before printf()ing it.

-- 
   Eli Brandt
   eli+@cs.cmu.edu