[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Re: SF.net SVN: supercollider:[8089] trunk/Source/plugins



2008/12/9, Tim Blechmann <tim@xxxxxxxxxx>:
> > Revision: 8089
>  >           http://supercollider.svn.sourceforge.net/supercollider/?rev=8089&view=rev
>  > Author:   danstowell
>  > Date:     2008-12-09 18:30:13 +0000 (Tue, 09 Dec 2008)
>  >
>  > Log Message:
>  > -----------
>  > Fix some compiler warnings: double->float stuff, and unneeded
>  > double-declaration of vars
>
>
> hm, what about using c99-style single-precision math functions like expf
>  or c++-style cmath functions like std::exp? should be both faster and
>  cleaner to read ...

I was just making explicit, the current implicit cast. But AFAIK using
expf() would be fine, I doubt that there's any particular need for the
exponential calculation to be double-precision given that the result
is stored in single-precision.

Actually this appears in many places in UGen code. There are many occurrences of

  somefloat == 0.f ? 0.f : exp(log001/(somethingelse))

and it's possible that the double-precision exp() is pointless in many
places. Anyone else got thoughts about this? I haven't anything
empirical on this...

Dan

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/