I went ahead and wrote the CPP code to pack and unpack the data. Source code attached.
-Steve ________________________________ From: Tomasz Janeczko <[email protected]> To: [email protected] Sent: Sunday, February 8, 2009 5:39:28 AM Subject: Re: [amibroker] Re: AFL floating point number representation? Hello, That depends on what exactly (how much data per bar/per signal) you are after. The devil is in the details. Please provide more info. Best regards, Tomasz Janeczko amibroker.com ----- Original Message ----- From: <hydrob...@rocketmai l.com> To: <amibro...@yahoogrou ps.com> Sent: Sunday, February 08, 2009 1:57 AM Subject: [amibroker] Re: AFL floating point number representation? > Thanks Tomasz. I'm looking for a clever way to stuff two numbers into > the 32 bit float and then later extract the 2 numbers. > > // fraction = 23 bit integer > // exponent = 8 bit integer > > The reason for doing this is to efficiently get an extra array of > numbers into the portfolio backtester without thousands of static vars > or Foreign symbols. > > Is there a way to do this in AFL without writing a DLL? > > --- In amibro...@yahoogrou ps.com, "Tomasz Janeczko" <gro...@...> wrote: >> >> Hello, >> >> IEEE 754 Standard floating point (32 bit, single precision) >> http://en.wikipedia .org/wiki/ IEEE_754- 1985 >> >> Best regards, >> Tomasz Janeczko >> amibroker.com >> ----- Original Message ----- >> From: <hydrob...@. ..> >> To: <amibro...@yahoogrou ps.com> >> Sent: Saturday, February 07, 2009 5:13 PM >> Subject: [amibroker] AFL floating point number representation? >> >> >> >I need to know what range of values and what precision can be >> > represented in the AFL floating point arrays, specifically the >> > PositionSize array. >> > >> > It would also be useful to know how many bits are available in the >> > mantissa and exponent. Any help appreciated. >> > >> > Thanks, >> > Steve >> > >> > >> > >> > ------------ --------- --------- ------ >> > >> > **** IMPORTANT **** >> > This group is for the discussion between users only. >> > This is *NOT* technical support channel. >> > >> > ************ ********* >> > TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail > directly to >> > SUPPORT {at} amibroker.com >> > ************ ********* >> > >> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: >> > http://www.amibroke r.com/devlog/ >> > >> > For other support material please check also: >> > http://www.amibroke r.com/support. html >> > >> > ************ ********* ********* *** >> > Yahoo! Groups Links >> > >> > >> > >> > > > > > ------------ --------- --------- ------ > > **** IMPORTANT **** > This group is for the discussion between users only. > This is *NOT* technical support channel. > > ************ ********* > TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > ************ ********* > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroke r.com/devlog/ > > For other support material please check also: > http://www.amibroke r.com/support. html > > ************ ********* ********* *** > Yahoo! Groups Links > > >
PackUnpack.cpp
Description: Binary data
