🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.mathematics
Article #32

How to find a formula from a list of numbers

#32
From: Adam Nielsen
Date: Sun, 04 Oct 2009 13:24
29 lines
2375 bytes
Hi all,

Sorry for the basic question but it's been a while!  I have a list of numbers:

  A  | B
-----+-----
 0   | 0
 32  | 3.6
 64  | 7.6
 128 | 15.6
 255 | 31.5

And I need a formula such that I can put in any number (between 0 and 255
inclusive) for A, and obtain the result B.  Unfortunately because this isn't
quite straightforward division I'm a bit stuck.

Just for a bit of background I'm writing a Linux driver for a USB-connected PC
power supply, and the current being drawn on the various rails is reported as
an 8-bit number (A) and for it to be of any use it will need to be converted
into amps (B).  The values above are taken from the Windows driver, so there
could be some rounding issues in the values of B depending on how well that
code was written.

Annoyingly the six current rails all have slightly different values for B, so
I'd be grateful for a couple of tips so I can calculate a formula for each of
those as well.

Many thanks,
Adam.
Technical Details
Message-ID: <JOqdnbc8ud5gPFXXnZ2dnUVZ_v6dnZ2d@westnet.com.au>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.westnet.com.au!news.westnet.com.au.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: dfcd5d83b8,ea449aa0d72efcd3,start
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!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.westnet.com.au!news.westnet.com.au.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 04 Oct 2009 08:24:13 -0500
Date: Sun, 04 Oct 2009 23:24:12 +1000
From: Adam Nielsen <a.nielsen@remove.this.shikadi.net>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.1.22) Gecko/20090809 Thunderbird/2.0.0.22 Mnenhy/0.7.5.0
MIME-Version: 1.0
Newsgroups: aus.mathematics
Subject: How to find a formula from a list of numbers
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Message-ID: <JOqdnbc8ud5gPFXXnZ2dnUVZ_v6dnZ2d@westnet.com.au>
Lines: 29
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 203.217.41.238
X-Trace: sv3-WzD3ONPL0TCAHb91Mv1AZRybWQ5OS6hDCDU+6iO12a1LiBPV4sUs6lqK6TeO1ZhMVS2tl79i7Mghbm6!tapjUY+OEWEPEDcaUD2IiOCFCjc9EptNGTb3XQB7t5mn6DlKFeaTX/jcOmw7O8d/2uzA4A2GHTlg!B/po4SeTI8wVaxi10wl7bw==
X-Complaints-To: abuse@westnet.com.au
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40