🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.mathematics
Article #38

Re: How to find a formula from a list of numbers

#38
From: Barb Knox
Date: Sun, 04 Oct 2009 23:40
52 lines
2846 bytes
In article <mq6dnbOR7_Sjv1TXnZ2dnUVZ_r6dnZ2d@westnet.com.au>,
 Adam Nielsen <a.nielsen@remove.this.shikadi.net> wrote:

> > The simple divide and subtract will also keep the code nice and fast.  
> > However
> > I'm not so sure one of the other rails will be that easy:
> > 
> >   A  |  B'
> > -----+-----
> >  0   | 0
> >  1   | 0.1
> >  4   | 0.4
> >  8   | 0.9
> >  16  | 1.9
> >  32  | 3.8
> >  48  | 5.7
> >  64  | 7.6
> >  96  | 11.4
> >  128 | 15.2
> >  160 | 19.1
> >  192 | 22.9
> >  208 | 24.8
> >  224 | 26.7
> >  255 | 30.4
> 
> Oh having said that, I think this might work:
> 
>   B' = A/10 + A/52
> 
> Not sure quite how their rounding works, so let me know if you have any 
> better
> ideas!

Note that for A >= 16, doubling A also doubles B'.
The best fit is
    B' = A/16 * 1.91, truncated to 1 decimal place.

1.91/16 = 0.119375,
and your rational approximation for that is 
    1/10 + 1/52 = 31/260 = 0.1192307

Note that there are closer rational approximations, but any one that 
provides the correct B' values to 1 decimal place is close enough.

-- 
---------------------------
|  BBB                b    \     Barbara at LivingHistory stop co stop uk
|  B  B   aa     rrr  b     |
|  BBB   a  a   r     bbb   |    Quidquid latine dictum sit,
|  B  B  a  a   r     b  b  |    altum viditur.
|  BBB    aa a  r     bbb   |   
-----------------------------
Technical Details
Message-ID: <see-F90A00.12401205102009@mail.eternal-september.org>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!not-for-mail
References: <JOqdnbc8ud5gPFXXnZ2dnUVZ_v6dnZ2d@westnet.com.au> <ik9hc59at0uhkd54jr78j3ba55a8j7cesm@4ax.com> <see-3529E1.08572405102009@mail.eternal-september.org> <FtadnaK-YsVEvVTXnZ2dnUVZ_oKdnZ2d@westnet.com.au> <mq6dnbOR7_Sjv1TXnZ2dnUVZ_r6dnZ2d@westnet.com.au>

Show Full Headers
Complete Article Headers
X-Google-Thread: dfcd5d83b8,ea449aa0d72efcd3
X-Google-Attributes: giddfcd5d83b8,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!not-for-mail
From: Barb Knox <see@sig.below>
Newsgroups: aus.mathematics
Subject: Re: How to find a formula from a list of numbers
Date: Mon, 05 Oct 2009 12:40:12 +1300
Organization: I'm not unemployed; I'm a consultant
Lines: 52
Message-ID: <see-F90A00.12401205102009@mail.eternal-september.org>
References: <JOqdnbc8ud5gPFXXnZ2dnUVZ_v6dnZ2d@westnet.com.au> <ik9hc59at0uhkd54jr78j3ba55a8j7cesm@4ax.com> <see-3529E1.08572405102009@mail.eternal-september.org> <FtadnaK-YsVEvVTXnZ2dnUVZ_oKdnZ2d@westnet.com.au> <mq6dnbOR7_Sjv1TXnZ2dnUVZ_r6dnZ2d@westnet.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: news.eternal-september.org U2FsdGVkX18H7wKhnfUTH85IM6/xVlAPEV87srCdTozghAKQ6C/lWArutgzZ/GBmmsYlHyMF324SSOKISXnws5GGtv2zSWMv06+7XkiAGNAJuGn1vGuvF95qXuEZKE4DSRcE3aBKGgh2S8OKmBERiw==
X-Complaints-To: abuse@eternal-september.org
NNTP-Posting-Date: Sun, 4 Oct 2009 23:40:23 +0000 (UTC)
X-Auth-Sender: U2FsdGVkX1/xGw73rRYGnol6Z9DSRVfjBnhTTaZTLDU=
Cancel-Lock: sha1:X82nWTEm/RD8Uac0btEehs8Jtm4=
User-Agent: MT-NewsWatcher/3.5.3b3 (PPC Mac OS X)