🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.mathematics
Article #41

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

#41
From: Barb Knox
Date: Tue, 06 Oct 2009 20:36
76 lines
4237 bytes
In article <see-6C28F8.14281106102009@mail.eternal-september.org>,
 Barb Knox <see@sig.below> wrote:

> In article <EK-dnV5FoYzmRFTXnZ2dnUVZ_jKdnZ2d@westnet.com.au>,
>  Adam Nielsen <a.nielsen@remove.this.shikadi.net> wrote:
> 
> > > 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.
> > 
> > Ah, glad to see I was close!  Thanks again.  I've got all the current 
> > values
> > sorted now, but I've discovered that the fan speeds seem to be reported on
> > some sort of logarithmic scale:
> > 
> >    A  |  B
> > ------+---------
> >   128 | 8943 RPM / 943 RPM *
> >   144 | 9727 RPM *
> >   256 | 5493 RPM
> >   512 | 2746 RPM
> >  1285 | 1094 RPM
> >  4096 | 343 RPM
> >  8192 | 171 RPM
> > 65535 | 21 RPM
> > 
> > I'm not 100% sure about the first two values (marked with *) because the
> > values were so large I'm not sure the manufacturer's program was drawing 
> > them
> > on the screen properly.
> > 
> > I *think* this is logarithmic - I can get an approximation of the curve 
> > using
> > variations of -log(x), but I'm afraid that's as far I as can remember :-)  
> > If
> > it's possible, an approximation using "simpler" operations (+, -, *, /) 
> > would
> > be even better from a runtime efficiency point of view!
> 
> A little hacking around in Excel shows that this is a log-log 
> relationship.  In particular:
>     log_2(B) = 20.44592638 - 1.002677224*log_2(A)
> with a maximum absolute error of 0.010795444
> 
> With these coefficients, the B value for A=128 would be 11015.

Oh bother.  I failed to appreciate the fact that -1.002677224 is 
probably close enough to -1 for this problem, so the log-log power 
relationship between B and A could be a simple reciprocal.  And indeed, 
here's an exact formula for the non-starred values that does not use 
logs:
    B = int(1406315/A)

With this formula, A=128 gives B=10986, and A=144 gives B=9766.


> > Thanks again,
> > Adam.
> 
> HTH

-- 
---------------------------
|  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-5333A5.09364407102009@mail.eternal-september.org>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder.news-service.com!188.40.43.213.MISMATCH!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> <see-F90A00.12401205102009@mail.eternal-september.org> <EK-dnV5FoYzmRFTXnZ2dnUVZ_jKdnZ2d@westnet.com.au> <see-6C28F8.14281106102009@mail.eternal-september.org>

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!188.40.43.213.MISMATCH!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: Wed, 07 Oct 2009 09:36:44 +1300
Organization: I'm not unemployed; I'm a consultant
Lines: 76
Message-ID: <see-5333A5.09364407102009@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> <see-F90A00.12401205102009@mail.eternal-september.org> <EK-dnV5FoYzmRFTXnZ2dnUVZ_jKdnZ2d@westnet.com.au> <see-6C28F8.14281106102009@mail.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: news.eternal-september.org U2FsdGVkX19utK94BxU+nmYATwlHmR93uyolSVHS+5oaszCZ72CPfXOUzHtW9+ODNkdzO/mxXYYlEfSjnkErHsAdqU/KV3jhxhIAxf9eKpcNay77ZPYnk5uxzQVsrg34Qgwmz7Su/KO1EE6ZKL4pzA==
X-Complaints-To: abuse@eternal-september.org
NNTP-Posting-Date: Tue, 6 Oct 2009 20:36:50 +0000 (UTC)
X-Auth-Sender: U2FsdGVkX1973wbhkGB8r/DrXfZJ4CrpyEw36w1GsOc=
Cancel-Lock: sha1:mZmoXKVQiwYrfi+hY+sfUSV4fKY=
User-Agent: MT-NewsWatcher/3.5.3b3 (PPC Mac OS X)