Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

continued fraction program

45 views
Skip to first unread message

Jon Kirwan

unread,
Jun 20, 2009, 5:50:33 PM6/20/09
to
Okay. I think I'm done playing, for now. There's a free continuous
fraction program available. This program provides the convergents for
the continuous fractions of a value (plus declining error terms) and
includes a well-featured calculator (with variable assignment support
and multi-statement capability (use a ; to separate statements or
expressions, or just type them one line at a time) and displays
floating point notation in either single or double precision (the
calculator itself can be switched to either mode.) So it may have a
variety of practical uses for folks in embedded work of one kind or
another.

To keep it quick for me to develop and test (five hours of work, so
far), I used VBDOS 1.0 as the compiler and it is developed to operate
under DOS (obviously.) It works, so far as I'm aware, under the DOS
boxes of various Windows incarnations. In order to avoid problems
with sucking down CPU time while waiting for keystrokes (busy loop),
the code also uses the DOS multiplex interrupt to release CPU time
back to Windows during busy wait looping on keys. So it shouldn't do
what many such DOS programs do when running under WinXP, for example,
which is effectively hogging cpu time and presenting delays everywhere
else on the machine.

The screen will auto-adjust to 50-line mode, if your DOS box otherwise
starts up in other line modes, but will return back to the mode it
starts in when it exits. Just be prepared for the 50-line display
change, if you run it. Should also run under plain vanilla DOS
systems, no Windows at all, so long as the video display supports the
50-line mode. That may be helpful with some PC104 systems.

It's free. Distribute it anyway you please. (It is offered basically
"as is" and includes a non-transferable, non-exclusive, royalty-free
worldwide license to use, copy, modify, prepare derivative works of,
and distribute. More details are in the COPYRGHT.TXT file found in
the ZIP that includes the .EXE file.)

The source code is also free for the asking on the same basis. But it
will require at least QB4.5, 7.0, 7.1, or VBDOS to compile. It's in
several modules but it's not hard to assemble the pieces into a QBASIC
runnable version, though (I did it, just to be sure it works.) So
that can be done successfully. (QBASIC is also free from Microsoft.)

It's at:
http://www.infinitefactors.org/math/cf.zip

Let me know if there are helpful improvements and I'll see what I can
do.

Jon

RogerN

unread,
Jun 20, 2009, 7:05:57 PM6/20/09
to

"Jon Kirwan" <jo...@infinitefactors.org> wrote in message
news:77jq35pcq11vrhg19...@4ax.com...
<snip>

> It's free. Distribute it anyway you please. (It is offered basically
> "as is" and includes a non-transferable, non-exclusive, royalty-free
> worldwide license to use, copy, modify, prepare derivative works of,
> and distribute. More details are in the COPYRGHT.TXT file found in
> the ZIP that includes the .EXE file.)
>
> The source code is also free for the asking on the same basis. But it
> will require at least QB4.5, 7.0, 7.1, or VBDOS to compile. It's in
> several modules but it's not hard to assemble the pieces into a QBASIC
> runnable version, though (I did it, just to be sure it works.) So
> that can be done successfully. (QBASIC is also free from Microsoft.)
>
> It's at:
> http://www.infinitefactors.org/math/cf.zip
>
> Let me know if there are helpful improvements and I'll see what I can
> do.
>
> Jon


I learned about using continued fractions for gearing in machinery. For
example if you need to cut metric screw threads in a lathe with an inch lead
screw or vice versa. The exact conversion always requires a 127 tooth gear
due to 127 mm = 5 inches. If you don't have a 127 tooth gear for the exact
conversion, you can use continued fractions to see how close you can get to
the metric pitch you need using the change gears that you have available.

Can your CF calculator be used for gear ratios like that? (Example:
calculating a gear ratio that is close to 25.4 threads per inch from a screw
with maybe 8 TPI)

RogerN


Jon Kirwan

unread,
Jun 20, 2009, 7:35:29 PM6/20/09
to
On Sat, 20 Jun 2009 18:05:57 -0500, "RogerN" <re...@midwest.net>
wrote:

Yes. I think so. Here is the result for 25.4/8:

1: 3/1 -55,118.110 ppm
2: 16/5 7,874.016 ppm
3: 19/6 -2,624.672 ppm
4: 54/17 463.177 ppm
5: 73/23 -342.349 ppm
6: 127/40 exact

You tell me if that is what you were wondering about.

Jon

BobW

unread,
Jun 20, 2009, 7:47:58 PM6/20/09
to

"Jon Kirwan" <jo...@infinitefactors.org> wrote in message
news:9esq3598e7vdp3eh9...@4ax.com...

That's interesting. So, 127/5 = 25.400000....

I wonder if this has any significance to the chosen exact ratio of
25.4mm/inch ?

Bob
--
== All google group posts are automatically deleted due to spam ==


RogerN

unread,
Jun 20, 2009, 7:51:44 PM6/20/09
to

"BobW" <nimby_GIMM...@roadrunner.com> wrote in message
news:OsKdnbVdFZ6z6KDX...@giganews.com...


Yes, 25.4 mm per inch would be 254mm per 10 inches but can be reduced to
127mm in 5 inches.

RogerN


BobW

unread,
Jun 20, 2009, 7:58:56 PM6/20/09
to

"RogerN" <re...@midwest.net> wrote in message
news:4aadnZ-e6P-F66DX...@earthlink.com...

Dang. That was too easy and obvious. I was hoping for something deeper. Oh
well.

;-)

RogerN

unread,
Jun 20, 2009, 8:13:34 PM6/20/09
to

"Jon Kirwan" <jo...@infinitefactors.org> wrote in message
news:9esq3598e7vdp3eh9...@4ax.com...

> On Sat, 20 Jun 2009 18:05:57 -0500, "RogerN" <re...@midwest.net>
> wrote:
>
<snip>

> Yes. I think so. Here is the result for 25.4/8:
>
> 1: 3/1 -55,118.110 ppm
> 2: 16/5 7,874.016 ppm
> 3: 19/6 -2,624.672 ppm
> 4: 54/17 463.177 ppm
> 5: 73/23 -342.349 ppm
> 6: 127/40 exact
>
> You tell me if that is what you were wondering about.
>
> Jon

Yeah, that looks like it would do it.

So if number 4: 54/17 was close enough the compound gearing might be
something like:

Multiply the fraction to get compound gearing, I'm doubling here.

2* 2*3*3*3
2* 17
=
6 * 18
2 * 17

So my final gears might be

36:12
and
36:34

So I'd have, from spindle to lead screw, a 34 driving a 36 attached to a 12
driving a 36 on the lead screw.

RogerN


John Larkin

unread,
Jun 20, 2009, 9:03:13 PM6/20/09
to
On Sat, 20 Jun 2009 21:50:33 GMT, Jon Kirwan
<jo...@infinitefactors.org> wrote:

>Okay. I think I'm done playing, for now. There's a free continuous
>fraction program available. This program provides the convergents for
>the continuous fractions of a value (plus declining error terms) and
>includes a well-featured calculator (with variable assignment support
>and multi-statement capability (use a ; to separate statements or
>expressions, or just type them one line at a time) and displays
>floating point notation in either single or double precision (the
>calculator itself can be switched to either mode.) So it may have a
>variety of practical uses for folks in embedded work of one kind or
>another.

Neat, writing and giving away programs.

I just a minute ago finished a PowerBasic (Console Compiler) program
that prowls my parts database looking for pairs of resistors that can
hit a desired ratio (tolerance specified) and Thevenin range. It
allows me to include 0603, 0805, or 1206 resistors in any combination.

It outputs a file that lists all the pairs, actual ratio, ratio error,
and actual parallel (Thevenin) value, followed by a 1-line inventory
report for each. The output file looks like...

RUGRAT Resistor ratio report 06-20-2009 17:35:18

Target ratio 2.500000
Accuracy limit 1.000 per cent
Thevenin 500.000 to 2,000.000
Types : 0805


Ratio 2.517483 Error 0.699 pct Thevenin 511.730
132-5250 RES 0805 1.8K 5%
DIGIKEY P1.8KACT-ND 0.01 4226 11671
132-4821 RES 0805 715R 1%
DIGIKEY RHM715CCT-ND 0.02 196 11104

Ratio 2.481390 Error -0.744 pct Thevenin 574.483
132-5291 RES 0805 2K 1%
DIGIKEY P2.00KCCT-ND 0.01 5348 11759
132-4871 RES 0805 1/8W 806R 1% KOA
RK73H2A8060F 0.01 515 11777

Ratio 2.481390 Error -0.744 pct Thevenin 574.483
132-5291 RES 0805 2K 1%
DIGIKEY P2.00KCCT-ND 0.01 5348 11759
132-4872 RES 0805 806R 0.1%
MOUSER 71-TNPW0805806RBE 0.64 79 11597

Ratio 2.481390 Error -0.744 pct Thevenin 574.483
132-5292 RES 0805 2K 0.1%
MOUSER 71-TNPW08052K00BE 0.64 81 11596
132-4871 RES 0805 1/8W 806R 1% KOA
RK73H2A8060F 0.01 515 11777


etc, 32 solutions in this case, several perfect hits. The parts lines
are long, so wrap when pasted to the newsgroup.

This is about 400 lines of code, took about 2 hours to do, although
I'll probably spend another hour to check, beautify, and comment
everything. The PBCC compiler allows real SLEEP commands, so I use
them to keep the cpu from being hogged when nothing's going on.

I included a spiffy progress bar for when it's doing the file input
and crunching, which turned out to be silly since it runs in about
half a second. The search is a brute-force nested FOR loop.

This is free too, but it needs an input file that includes one line
per resistor in stock, in our format, so some futzing would be needed
for general use. Our material control system MAX makes this text file
automatically every time it's run, so I used that instead of opening
the binary record file.

Oh, it's packed with GOTOs.

John


CBFalconer

unread,
Jun 20, 2009, 8:31:44 PM6/20/09
to
Jon Kirwan wrote:
> "RogerN" <re...@midwest.net> wrote:
>> "Jon Kirwan" <jo...@infinitefactors.org> wrote:
>>
>> <snip>
>>
>>> It's free. Distribute it anyway you please. (It is offered
>>> basically "as is" and includes a non-transferable, non-exclusive,
>>> royalty-free worldwide license to use, copy, modify, prepare
>>> derivative works of, and distribute. More details are in the
>>> COPYRGHT.TXT file found in the ZIP that includes the .EXE file.)
>>>
>>> The source code is also free for the asking on the same basis.
>>> But it will require at least QB4.5, 7.0, 7.1, or VBDOS to compile.
>>> It's in several modules but it's not hard to assemble the pieces
>>> into a QBASIC runnable version, though (I did it, just to be sure
>>> it works.) So that can be done successfully. (QBASIC is also
>>> free from Microsoft.)
>>>
>>> It's at: http://www.infinitefactors.org/math/cf.zip
>>>
>>> Let me know if there are helpful improvements and I'll see what
>>> I can do.
>>
>> I learned about using continued fractions for gearing in machinery.
>> For example if you need to cut metric screw threads in a lathe with
>> an inch lead screw or vice versa. The exact conversion always
>> requires a 127 tooth gear due to 127 mm = 5 inches. If you don't
>> have a 127 tooth gear for the exact conversion, you can use
>> continued fractions to see how close you can get to the metric
>> pitch you need using the change gears that you have available.
>>
>> Can your CF calculator be used for gear ratios like that?
>> (Example: calculating a gear ratio that is close to 25.4 threads
>> per inch from a screw with maybe 8 TPI)
>
> Yes. I think so. Here is the result for 25.4/8:
>
> 1: 3/1 -55,118.110 ppm
> 2: 16/5 7,874.016 ppm
> 3: 19/6 -2,624.672 ppm
> 4: 54/17 463.177 ppm
> 5: 73/23 -342.349 ppm
> 6: 127/40 exact
>
> You tell me if that is what you were wondering about.

That doesn't appear to be what I call a continued fraction. It
seems much closer to the following (which is purely standard C -
will run anywhere):

/* Find best rational approximation to a double */
/* by C.B. Falconer, 2006-09-07. Released to public domain */

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <limits.h>
#include <errno.h>

int main(int argc, char **argv)
{
int num, approx, bestnum, bestdenom;
int lastnum = 500;
double error, leasterr, value, criterion, tmp;
char *eptr;

value = 4 * atan(1.0);
if (argc > 2) lastnum = strtol(argv[2], NULL, 10);
if (lastnum <= 0) lastnum = 500;
if (argc > 1) {
tmp = strtod(argv[1], &eptr);
if ((0.0 >= tmp) || (tmp > INT_MAX) || (ERANGE == errno)) {
puts("Invalid number, using PI");
}
else value = tmp;
}
criterion = 2 * value * DBL_EPSILON;
puts("Usage: ratvalue [number [maxnumerator]]\n"
"number defaults to PI, maxnumerator to 500");
printf("Rational approximation to %.*f\n", DBL_DIG, value);

for (leasterr = value, num = 1; num < lastnum; num++) {
approx = (int)(num / value + 0.5);
if (0 == (int)approx) continue;
error = fabs((double)num / approx - value);
if (error < leasterr) {
bestnum = num;
bestdenom = approx;
leasterr = error;
printf("%8d / %-8d = %.*f with error %.*f\n",
bestnum, bestdenom,
DBL_DIG, (double)bestnum / bestdenom,
DBL_DIG, leasterr);
if (leasterr <= criterion) break;
}
}
return 0;
} /* main */

Using this on 25.4/8 (= 6.175) (some blanks elided):

[1] c:\c\ratapprx>ratapprx 6.175
Usage: ratvalue [number [maxnumerator]]
number defaults to PI, maxnumerator to 500
Rational approximation to 6.175000000000000
4 / 1 = 4.000000000000000 with error 2.175000000000000
5 / 1 = 5.000000000000000 with error 1.175000000000000
6 / 1 = 6.000000000000000 with error 0.175000000000000
19 / 3 = 6.333333333333333 with error 0.158333333333334
25 / 4 = 6.250000000000000 with error 0.075000000000000
31 / 5 = 6.200000000000000 with error 0.025000000000000
37 / 6 = 6.166666666666667 with error 0.008333333333333
68 / 11 = 6.181818181818182 with error 0.006818181818182
105 / 17 = 6.176470588235294 with error 0.001470588235294
142 / 23 = 6.173913043478261 with error 0.001086956521739
247 / 40 = 6.175000000000000 with error 0.000000000000000

which indicates some errors in your program to me, or a
misunderstanding.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.


CBFalconer

unread,
Jun 20, 2009, 9:54:51 PM6/20/09
to
Jon Kirwan wrote:
>
... snip ...

>
> Yes. I think so. Here is the result for 25.4/8:
>
> 1: 3/1 -55,118.110 ppm
> 2: 16/5 7,874.016 ppm
> 3: 19/6 -2,624.672 ppm
> 4: 54/17 463.177 ppm
> 5: 73/23 -342.349 ppm
> 6: 127/40 exact
>
> You tell me if that is what you were wondering about.

My earlier answer was almost accurate, but I ran my program with
the wrong input. Try:

[1] c:\c\ratapprx>ratapprx 3.175


Usage: ratvalue [number [maxnumerator]]
number defaults to PI, maxnumerator to 500

Rational approximation to 3.175000000000000
2 / 1 = 2.000000000000000 with error 1.175000000000000
3 / 1 = 3.000000000000000 with error 0.175000000000000
10 / 3 = 3.333333333333333 with error 0.158333333333334
13 / 4 = 3.250000000000000 with error 0.075000000000000
16 / 5 = 3.200000000000000 with error 0.025000000000000
19 / 6 = 3.166666666666667 with error 0.008333333333333
35 / 11 = 3.181818181818182 with error 0.006818181818182
54 / 17 = 3.176470588235294 with error 0.001470588235294
73 / 23 = 3.173913043478261 with error 0.001086956521739
127 / 40 = 3.175000000000000 with error 0.000000000000000

So my comment about errors is nonsense.

John Larkin

unread,
Jun 20, 2009, 10:00:04 PM6/20/09
to
On Sat, 20 Jun 2009 20:31:44 -0400, CBFalconer <cbfal...@yahoo.com>
wrote:

25.4/8 is 3.175.

John


Jon Kirwan

unread,
Jun 20, 2009, 10:24:35 PM6/20/09
to
On Sat, 20 Jun 2009 21:54:51 -0400, CBFalconer <cbfal...@yahoo.com>
wrote:

><snip>


>My earlier answer was almost accurate, but I ran my program with
>the wrong input. Try:
>
>[1] c:\c\ratapprx>ratapprx 3.175
>Usage: ratvalue [number [maxnumerator]]
>number defaults to PI, maxnumerator to 500
>Rational approximation to 3.175000000000000
> 2 / 1 = 2.000000000000000 with error 1.175000000000000
> 3 / 1 = 3.000000000000000 with error 0.175000000000000
> 10 / 3 = 3.333333333333333 with error 0.158333333333334
> 13 / 4 = 3.250000000000000 with error 0.075000000000000
> 16 / 5 = 3.200000000000000 with error 0.025000000000000
> 19 / 6 = 3.166666666666667 with error 0.008333333333333
> 35 / 11 = 3.181818181818182 with error 0.006818181818182
> 54 / 17 = 3.176470588235294 with error 0.001470588235294
> 73 / 23 = 3.173913043478261 with error 0.001086956521739
> 127 / 40 = 3.175000000000000 with error 0.000000000000000
>
>So my comment about errors is nonsense.

No problem. By the way, I only provide convergents. Just keep that
in mind. The CF for 3.175 is [3;5,1,2,1,1]. This means exactly 6
convergents. Which is what you saw me post.

Jon

Jon Kirwan

unread,
Jun 20, 2009, 10:35:54 PM6/20/09
to
On Sun, 21 Jun 2009 02:24:35 GMT, I wrote:

><snip>


>The CF for 3.175 is [3;5,1,2,1,1].

><snip>

By the way, that program ALSO is a calculator program. In includes a
few predefined values, like PI and E, but also all of the usual math
functions like SIN, COS, COSH, EXP, LN, LOG, ABS, COTH, SQRT, and you
name it. You can enter numbers, expressions, assignment statements,
access the prior answer as part of the next formula, enter FP numbers
in pure HEX format, use CF expressions such as [2;1,1,1]+[0;2,2,2] and
get a return of [3;11,1] as your CF, which is 8/3+5/12 = 37/12.

Thought I'd get the point across that it doesn't just accept simple
numbers. You can enter SQRT(7) and immediately see that it is the CF
of [2;1,1,1,4,1,1,1,4,1,1,1,4,...] Just saying...

Jon

Robert Baer

unread,
Jun 20, 2009, 11:22:10 PM6/20/09
to
"Close" is not good enough; the Jameco cabinet mounting plate for 19"
racks (PN 149500) now come with screws; i think they are made in China
on Metric lathes.
The screws look OK even against US ones, but they will not fit;
forcing them will result in a virtual single piece of rack rail plus
useless screw.
And Jameco refuses to acknowledge the problem - much less fix it.

Robert Baer

unread,
Jun 20, 2009, 11:26:11 PM6/20/09
to
Don't you need a lot of food for the GOATs?

Spehro Pefhany

unread,
Jun 21, 2009, 7:01:46 AM6/21/09
to

You'll find 127-tooth gears in many thread-cutting metalworking
lathes.

Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
sp...@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com

Jon Kirwan

unread,
Jun 21, 2009, 7:56:25 AM6/21/09
to
On Sun, 21 Jun 2009 02:24:35 GMT, Jon Kirwan
<jo...@infinitefactors.org> wrote:

>By the way, I only provide convergents. Just keep that
>in mind. The CF for 3.175 is [3;5,1,2,1,1]. This means exactly 6
>convergents.

For 25.4/8 the screen looks something like:

> ------------------------------------------------------------------------------
> IEEE CONTINUOUS FRACTIONS Version 8
> ------------------------------------------------------------------------------
> This program includes a full featured calculator function and displays the
> results, the convergents of their continued fractions, and floating point
> notation. It supports both single and double precision formats, which can
> be changed by using a ! or # command, respectively. A blank command exits
> the program or use ? command for some help. You may prefix a hexadecimal
> value with &H, to enter an exact floating point binary pattern, if desired.
>
> Sgn Exponent 1 <-(hidden bit) Upper Mantissa
> +-+ +---------------------+ +---------------------------------------+
> �0� �1�0�0�0�0�0�0�0�0�0�0� �1�0�0�1�0�1�1�0�0�1�1�0�0�1�1�0�0�1�1�0�
> +-+ +---------------------+ +---------------------------------------+
> +---------------------------------------------------------------+
> Lower �0�1�1�0�0�1�1�0�0�1�1�0�0�1�1�0�0�1�1�0�0�1�1�0�0�1�1�0�0�1�1�0�
> Mantissa+---------------------------------------------------------------+
>
> Hex: 4009666666666666
> Val: 3.175
> CF: [3;5,1,2,1,1]


>
> 1: 3/1 -55,118.110 ppm
> 2: 16/5 7,874.016 ppm
> 3: 19/6 -2,624.672 ppm
> 4: 54/17 463.177 ppm
> 5: 73/23 -342.349 ppm
> 6: 127/40 exact

Actually, I use DOS drawing characters on the screen but you get the
idea. Floating point is called out, as well.

The simple help message from ? is:

> Built-in Variables:
> PI, E, ANS
>
> Built-in Functions:
> SIN, COS, TAN, SEC, CSC, CTN,
> ASIN, ACOS, ATAN, ASEC, ACSC, ACTN,
> SINH, COSH, TANH, SECH, CSCH, COTH,
> DEG, RAD, EXP, LOG, LN, LOG10, LOG2,
> SQRT, SQR, ABS, SGN, INT, RND
>
> Examples:
> a= SIN(PI/3); b= SIN(PI/4); DEG(ASIN(a*SQRT(1-b^2)+b*SQRT(1-a^2)))
> -(4+13)*8; ANS*2
> e^2+e^-2
> 4+&H41C80000
> INT(RND(1)*5)
> [1;1,1,1,1,1]
>
> Commands:
> ! -- switch to single precision format
> # -- switch to double precision format
> ? -- displays this help message

Jon

RogerN

unread,
Jun 21, 2009, 11:10:01 AM6/21/09
to

"Jon Kirwan" <jo...@infinitefactors.org> wrote in message
news:9esq3598e7vdp3eh9...@4ax.com...

> On Sat, 20 Jun 2009 18:05:57 -0500, "RogerN" <re...@midwest.net>
> wrote:
>
<snip>

> Yes. I think so. Here is the result for 25.4/8:
>
> 1: 3/1 -55,118.110 ppm
> 2: 16/5 7,874.016 ppm
> 3: 19/6 -2,624.672 ppm
> 4: 54/17 463.177 ppm
> 5: 73/23 -342.349 ppm
> 6: 127/40 exact
>
> You tell me if that is what you were wondering about.
>
> Jon

I thought it would be neat to write a program to calculate gear ratios and
use exact and ratios from continued fractions. I wanted to enter the gears
I had available in a table and see if I could get a program to select the
gears for the correct ratio.

But then I got a lathe with quick change gears and now I have a CNC lathe
that runs from EMC in Linux (linuxcnc.org). If I want to cut 10.123 threads
per inch, no problem.

RogerN

CBFalconer

unread,
Jun 21, 2009, 7:19:05 PM6/21/09
to

I don't know what you mean by 'convergents' or 'CF'. ratapprx
reports every value that reduces the error from the previous
trial. Note the continuous reduction in error. Errors are
absolute values.

Jon Kirwan

unread,
Jun 21, 2009, 9:20:40 PM6/21/09
to
On Sun, 21 Jun 2009 19:19:05 -0400, CBFalconer <cbfal...@yahoo.com>
wrote:

>Jon Kirwan wrote:
>> CBFalconer <cbfal...@yahoo.com> wrote:
>>
>>><snip>
>>>
>>> My earlier answer was almost accurate, but I ran my program with
>>> the wrong input. Try:
>>>
>>> [1] c:\c\ratapprx>ratapprx 3.175
>>> Usage: ratvalue [number [maxnumerator]]
>>> number defaults to PI, maxnumerator to 500
>>> Rational approximation to 3.175000000000000
>>> 2 / 1 = 2.000000000000000 with error 1.175000000000000
>>> 3 / 1 = 3.000000000000000 with error 0.175000000000000
>>> 10 / 3 = 3.333333333333333 with error 0.158333333333334
>>> 13 / 4 = 3.250000000000000 with error 0.075000000000000
>>> 16 / 5 = 3.200000000000000 with error 0.025000000000000
>>> 19 / 6 = 3.166666666666667 with error 0.008333333333333
>>> 35 / 11 = 3.181818181818182 with error 0.006818181818182
>>> 54 / 17 = 3.176470588235294 with error 0.001470588235294
>>> 73 / 23 = 3.173913043478261 with error 0.001086956521739
>>> 127 / 40 = 3.175000000000000 with error 0.000000000000000
>>>
>>> So my comment about errors is nonsense.
>>
>> No problem. By the way, I only provide convergents. Just keep that
>> in mind. The CF for 3.175 is [3;5,1,2,1,1]. This means exactly 6
>> convergents. Which is what you saw me post.
>
>I don't know what you mean by 'convergents' or 'CF'

CF (continued fraction) and convergent, if you look it up, is
explicitly defined. See Wiki:

http://en.wikipedia.org/wiki/Convergent_(continued_fraction)

I think another term for it is approximant.

>ratapprx
>reports every value that reduces the error from the previous
>trial. Note the continuous reduction in error. Errors are
>absolute values.

I list the sign of the relative error as to some people that may be an
important consideration. They can freely ignore the sign, if they
want to. It's not so easy to "put the sign back" if it isn't stated
in the listing.

Jon

Jon Kirwan

unread,
Jun 21, 2009, 9:50:32 PM6/21/09
to

><snip>

But I like convergent better. There's a reason.

There's a pair of recurrences related to successive numerators and
denominators (I can refer you to some pages on this, easily) that is
used to prove the fact that continued fractions, even in the case of
irrationals such as pi, e, and various sqrt()s, MUST "converge"
towards that particular value. The numerator sequence is often
denoted by p(i) or P(i) and the denominator sequence is often denoted
by q(i) or Q(i) in literature I've seen. It turns out that the even
pairs are always less and the odd pairs always more, but in exactly
this way:

p[0]/q[0] < p[2]/q[2] < ... < x < ... < p[3]/q[3] < p[1]/q[1]

This fact is developed through mathematical induction. I can describe
it here, but most folks wouldn't care. (However, I did post something
about it a week ago or so in sci.electronics.design.) The main point,
though, is that the value is bounded by the even and odd convergents
and trapped tighter and tighter as i goes towards infinity. Which, to
me, makes the term very appropriate. Approximant just doesn't carry
the meaning so well, to me.

Jon

Jasen Betts

unread,
Jun 22, 2009, 6:35:10 AM6/22/09
to
On 2009-06-20, BobW <nimby_GIMM...@roadrunner.com> wrote:

>> You tell me if that is what you were wondering about.
>>
>> Jon
>
> That's interesting. So, 127/5 = 25.400000....
>
> I wonder if this has any significance to the chosen exact ratio of
> 25.4mm/inch ?

25.4 is 254/10

AIUI the value 25.4mm was chosen for the inch in 1959 because it was close to
and between the values the Brittish and Americans were using for the inch

prior to this US and Canadian miles were different sizes which was fun
for surveyors.

Spehro Pefhany

unread,
Jun 22, 2009, 8:12:51 AM6/22/09
to

LOL

http://www.ngs.noaa.gov/faq.shtml#Feet

"This left NGS in the position of not wanting to mandate which
foot (U.S. Survey or International) a state should use. So, NGS left
that decision to the individual states. Currently, NGS publishes SPCs
for 7 states using the U.S. Survey Foot conversion factor, 1 state
using the International Foot conversion factor, and 42 states using
only meters, not feet, for SPCs. Based on STATE legislation we have
or
know about, 24 states have legislated the U.S. Survey Foot, 8 states
have legislated the International Foot, and 18 states have no
legislation on which conversion factor must be used."

Tim Shoppa

unread,
Jun 22, 2009, 10:55:50 AM6/22/09
to
On Jun 20, 7:47 pm, "BobW" <nimby_GIMME_SOME_S...@roadrunner.com>
wrote:
> "Jon Kirwan" <j...@infinitefactors.org> wrote in message

>
> news:9esq3598e7vdp3eh9...@4ax.com...
>
>
>
>
>
> > On Sat, 20 Jun 2009 18:05:57 -0500, "RogerN" <re...@midwest.net>
> > wrote:
>
> >>"Jon Kirwan" <j...@infinitefactors.org> wrote in message

What, you think someone had a warehouse full of 127-tooth gears they
wanted to get rid of? :-). 127 is a prime number.

25.6mm/inch would match 256/10 and 256 is not a prime number, it is
divisible by 2 and 4 and 8 and 16 and 32 and 64 and 128.

25.5mm/inch would match 255/10 and 255 is not a prime number, it is
divisible by 3 and 5 and 17.

Those would've been more inspired choices if you wanted to use
commonly-available gears.

Tim.

Tim Shoppa

unread,
Jun 22, 2009, 11:00:27 AM6/22/09
to
Other than 355/113 ~ pi, I always liked that sqrt(3/4) ~ 13/15.

It turns out

sqrt(4/5) is near 17/19
sqrt(5/6) is near 21/23
sqrt(6/7) is near 25/27

and so on. This is very useful when picking out gear ratios or divider
ratios etc.

Tim.

mac

unread,
Jun 22, 2009, 2:20:16 PM6/22/09
to

> Other than 355/113 ~ pi, I always liked that sqrt(3/4) ~ 13/15.

A good slide rule will give you lots of rational approximations...

CBFalconer

unread,
Jun 22, 2009, 7:02:57 PM6/22/09
to

[1] c:\>ratapprx 0.8660254037844386


Usage: ratvalue [number [maxnumerator]]
number defaults to PI, maxnumerator to 500

Rational approximation to 0.866025403784439
1 / 1 = 1.000000000000000 with error 0.133974596215561
4 / 5 = 0.800000000000000 with error 0.066025403784439
5 / 6 = 0.833333333333333 with error 0.032692070451105
6 / 7 = 0.857142857142857 with error 0.008882546641581
13 / 15 = 0.866666666666667 with error 0.000641262882228
45 / 52 = 0.865384615384615 with error 0.000640788399823
58 / 67 = 0.865671641791045 with error 0.000353761993394
71 / 82 = 0.865853658536585 with error 0.000171745247853
84 / 97 = 0.865979381443299 with error 0.000046022341140
181 / 209 = 0.866028708133971 with error 0.000003304349533

See my published code earlier in the thread. Note the sharp
improvements at 13/15, 71/82, 84/97, and 181/209.

who where

unread,
Jun 22, 2009, 8:44:12 PM6/22/09
to

now there's another compelling argument for the USofA to pull their collective
finger out and go metric .......

lowcost

unread,
Jun 24, 2009, 1:35:23 PM6/24/09
to
BobW ha scritto:

> That's interesting. So, 127/5 = 25.400000....
>
> I wonder if this has any significance to the chosen exact ratio of
> 25.4mm/inch ?

sure, Dan Brown know it.


regards
--
lowcost

mac

unread,
Jun 24, 2009, 6:16:04 PM6/24/09
to

> I wonder if this has any significance to the chosen exact ratio of
> 25.4mm/inch ?

It has to do with the number of barleycorns needed to circle the earth.
Or maybe the spacing of pins on a dual in-line package.

The Phantom

unread,
Jun 25, 2009, 5:30:19 AM6/25/09
to
On Sat, 20 Jun 2009 18:05:57 -0500, "RogerN" <re...@midwest.net> wrote:


>
>I learned about using continued fractions for gearing in machinery. For
>example if you need to cut metric screw threads in a lathe with an inch lead
>screw or vice versa. The exact conversion always requires a 127 tooth gear
>due to 127 mm = 5 inches. If you don't have a 127 tooth gear for the exact
>conversion, you can use continued fractions to see how close you can get to
>the metric pitch you need using the change gears that you have available.
>
>Can your CF calculator be used for gear ratios like that? (Example:
>calculating a gear ratio that is close to 25.4 threads per inch from a screw
>with maybe 8 TPI)
>

>RogerN
>

Well worth reading is:

http://www.americanscientist.org/issues/pub/on-the-teeth-of-wheels/5

Rube Bumpkin

unread,
Jun 25, 2009, 9:08:25 PM6/25/09
to
BobW wrote:
> "RogerN" <re...@midwest.net> wrote in message
> news:4aadnZ-e6P-F66DX...@earthlink.com...
>> "BobW" <nimby_GIMM...@roadrunner.com> wrote in message
>> news:OsKdnbVdFZ6z6KDX...@giganews.com...
>>> "Jon Kirwan" <jo...@infinitefactors.org> wrote in message
>>> news:9esq3598e7vdp3eh9...@4ax.com...

>>>> On Sat, 20 Jun 2009 18:05:57 -0500, "RogerN" <re...@midwest.net>
>>>> wrote:
>>>>
>>>>> "Jon Kirwan" <jo...@infinitefactors.org> wrote in message

>>>>> news:77jq35pcq11vrhg19...@4ax.com...
>>>>> <snip>
>>>>>> It's free. Distribute it anyway you please. (It is offered basically
>>>>>> "as is" and includes a non-transferable, non-exclusive, royalty-free
>>>>>> worldwide license to use, copy, modify, prepare derivative works of,
>>>>>> and distribute. More details are in the COPYRGHT.TXT file found in
>>>>>> the ZIP that includes the .EXE file.)
>>>>>>
>>>>>> The source code is also free for the asking on the same basis. But it
>>>>>> will require at least QB4.5, 7.0, 7.1, or VBDOS to compile. It's in
>>>>>> several modules but it's not hard to assemble the pieces into a QBASIC
>>>>>> runnable version, though (I did it, just to be sure it works.) So
>>>>>> that can be done successfully. (QBASIC is also free from Microsoft.)
>>>>>>
>>>>>> It's at:
>>>>>> http://www.infinitefactors.org/math/cf.zip
>>>>>>
>>>>>> Let me know if there are helpful improvements and I'll see what I can
>>>>>> do.
>>>>>>
>>>>>> Jon
>>>>> I learned about using continued fractions for gearing in machinery. For
>>>>> example if you need to cut metric screw threads in a lathe with an inch
>>>>> lead
>>>>> screw or vice versa. The exact conversion always requires a 127 tooth
>>>>> gear
>>>>> due to 127 mm = 5 inches. If you don't have a 127 tooth gear for the
>>>>> exact
>>>>> conversion, you can use continued fractions to see how close you can get
>>>>> to
>>>>> the metric pitch you need using the change gears that you have
>>>>> available.
>>>>>
>>>>> Can your CF calculator be used for gear ratios like that? (Example:
>>>>> calculating a gear ratio that is close to 25.4 threads per inch from a
>>>>> screw
>>>>> with maybe 8 TPI)
>>>> Yes. I think so. Here is the result for 25.4/8:
>>>>
>>>> 1: 3/1 -55,118.110 ppm
>>>> 2: 16/5 7,874.016 ppm
>>>> 3: 19/6 -2,624.672 ppm
>>>> 4: 54/17 463.177 ppm
>>>> 5: 73/23 -342.349 ppm
>>>> 6: 127/40 exact
>>>>
>>>> You tell me if that is what you were wondering about.
>>>>
>>>> Jon
>>> That's interesting. So, 127/5 = 25.400000....
>>>
>>> I wonder if this has any significance to the chosen exact ratio of
>>> 25.4mm/inch ?
>>>
>>> Bob
>>> --
>>> == All google group posts are automatically deleted due to spam ==
>>
>> Yes, 25.4 mm per inch would be 254mm per 10 inches but can be reduced to
>> 127mm in 5 inches.
>>
>> RogerN
>>
>>
>
> Dang. That was too easy and obvious. I was hoping for something deeper. Oh
> well.
>
> ;-)
>
> Bob

No, there's no significance at all. The 25.4 value is a close
approximation, but not exact. A meter originally was some even fraction
of the distance between the equator and the north pole (I think), based
on the crude measurements available at the time. The foot is based on
the length of some famous person's foot. A meter is approximately 39.37
inches, and the inverse of that, with some scaling is ~25.4 mm/inch

RB

RogerN

unread,
Jun 25, 2009, 11:00:19 PM6/25/09
to

"Rube Bumpkin" <Som...@somewhere.world> wrote in message
news:fcV0m.47586$mX2....@newsfe05.iad...

25.4 is the Exact value. It wasn't at one time but today it is the Exact
value.

RogerN


John Larkin

unread,
Jun 25, 2009, 11:04:39 PM6/25/09
to
On Thu, 25 Jun 2009 22:00:19 -0500, "RogerN" <re...@midwest.net>
wrote:

I read somewhere that, in the early days of IC layout, the x-acto +
rubylith times, they used 25.

John

RogerN

unread,
Jun 25, 2009, 11:17:55 PM6/25/09
to

"RogerN" <re...@midwest.net> wrote in message
news:NcidnT5oEfVRpNnX...@earthlink.com...

>
> "Rube Bumpkin" <Som...@somewhere.world> wrote in message
> news:fcV0m.47586$mX2....@newsfe05.iad...
>> BobW wrote:
<snip>

>>>>
>>>> Yes, 25.4 mm per inch would be 254mm per 10 inches but can be reduced
>>>> to 127mm in 5 inches.
>>>>
>>>> RogerN
>>>>
>>>>
>>>
>>> Dang. That was too easy and obvious. I was hoping for something deeper.
>>> Oh well.
>>>
>>> ;-)
>>>
>>> Bob
>>
>> No, there's no significance at all. The 25.4 value is a close
>> approximation, but not exact. A meter originally was some even fraction
>> of the distance between the equator and the north pole (I think), based
>> on the crude measurements available at the time. The foot is based on the
>> length of some famous person's foot. A meter is approximately 39.37
>> inches, and the inverse of that, with some scaling is ~25.4 mm/inch
>>
>> RB
>
> 25.4 is the Exact value. It wasn't at one time but today it is the Exact
> value.
>
> RogerN
>

Found some info on this.

http://en.wikipedia.org/wiki/Inch

International inch
Effective July 1, 1959, the United States and countries of the British
Commonwealth defined the length of the international yard to be 0.9144
meters. [1] Consequently, the international inch is defined to be equal to
25.4 millimeters.

The international standard symbol for inch is in (see ISO 31-1, Annex A). In
some cases, the inch is denoted by a double prime, which is often
approximated by double quotes, and the foot by a prime, which is often
approximated by an apostrophe.


On what basis is one inch exactly equal to 25.4 mm? Has the imperial inch
been adjusted to give this exact fit and if so when? (FAQ - Length)
The (international) inch has been exactly 25.4 mm since July 1959. At this
point in time the (international) yard was redefined as 0.9144 metre - until
this time the ratio between the US yard and the metre was different to the
ratio between the UK yard and the metre. For more information, see
Engineering Metrology by K J Hume (2 ed) Macdonald London 1967. The American
inch changed by 2 millionths of an inch and the UK inch by 1.7 millionths of
an inch. The international inch falls mid way between the old UK and US
inch.

References:

a.. The Yard Unit of Length Nature Vol. 200 No 4908 pp 730-732 23 Nov 1963
b.. The United Kingdom standards of the yard in terms of the metre
(British Applied Journal of Physics)
------
Standardization of the Inch
Don Hillger, PhD
Most people do not realize that the standardization of the inch for
worldwide use did not occur until 1959. Prior to that the inch had been
defined differently among the major inch-using countries: the U.S., Great
Britain, and Canada. Each of those countries had their own definition of the
inch, and in each case the inch was defined in terms of metric units, the
only set of internationally-accepted standards of length, mass, etc.

In the U.S. the metric system was made legal for all purposes, by the Metric
Act of 1866, long before any law defined our common U.S. measures. Later,
the Mendenhall Order of 1893 defined our common non-metric units in terms of
metric units. That law regarded metric units as the fundamental and
internationally-accepted standards for the U.S. It was this law that
formally defined the inch based on the conversion factor of 39.37 inches = 1
meter as stated in the Act of 1866. This ratio gives an inch approximately
equal to 25.40005 mm.

In Great Britain the National Physical Laboratory made comparisons of the
Imperial Standard Yard to the International Meter, which yielded differing
values for the inch over the years. The 1922 value of 25.399956 mm per inch
by was arbitrarily selected for use in calibrating the most precise
measuring devices.

The Canadian Parliament in 1951 established their inch based on a legal
definition of the yard as 0.9144 m. This ratio defined the inch as 25.4 mm,
a third definition of the inch. The Canadian inch was about 2 parts in 106
smaller than the U.S. standard and about 2 parts in 106 larger than the
British standard.

The differences in definitions of the inch were enough to cause confusion,
inefficiencies, and difficulties during World War II in attempts to
interchange various precision products. It was not until later, in 1959,
that the definition of the inch was standardized worldwide as 25.4
millimeters exactly.

But that agreement has not completely solved all the problems caused by
differing values for the inch. A problem still exists for the foot, where
the international foot (based on the 25.4 mm inch) and the survey foot
(based on the 25.40005 mm inch) are both still in use. The Coast and
Geodetic Survey continues to use the survey foot, whereas the rest of
industry uses the 25.4 mm inch. This leaves us with two definitions of the
mile, one based on the international foot and the other based on the survey
foot. Although this may not seem like much, it causes the two miles to
differ by about 3.2 mm (1/8 inch), or in 100 miles to differ by about 32 cm
(over one foot)!


Chris Burrows

unread,
Jun 25, 2009, 11:46:46 PM6/25/09
to
"RogerN" <re...@midwest.net> wrote in message
news:XMedndTLupdyoNnX...@earthlink.com...

>
>
> Found some info on this.
>
> http://en.wikipedia.org/wiki/Inch
>
> International inch
> Effective July 1, 1959, the United States and countries of the British
> Commonwealth defined the length of the international yard to be 0.9144
> meters. [1] Consequently, the international inch is defined to be equal to
> 25.4 millimeters.
>

Well I never! Was the number of furlongs per fortnight changed at the same
time or is that the same as it always has been ;-)

http://itotd.com/articles/286/furlongs-per-fortnight/

--
Chris Burrows
CFB Software
Armaide v2.0: Helping you to develop reliable ARM software
http://www.cfbsoftware.com/armaide


Jon Kirwan

unread,
Jun 26, 2009, 2:33:54 AM6/26/09
to
On Thu, 25 Jun 2009 22:17:55 -0500, "RogerN" <re...@midwest.net>
wrote:

A little later on, say 1983?

http://www.bipm.org/en/CGPM/db/17/1/

Jon

Robert Baer

unread,
Jun 26, 2009, 2:54:07 AM6/26/09
to
The way i was told, that a number of men coming out of a church were
lined up toe-to-heel and the total length divided by the number of men
became the foot; that number may have been ten.

Rich Webb

unread,
Jun 25, 2009, 10:33:04 PM6/25/09
to
On Thu, 25 Jun 2009 21:08:25 -0400, Rube Bumpkin
<Som...@somewhere.world> wrote:

>No, there's no significance at all. The 25.4 value is a close
>approximation, but not exact. A meter originally was some even fraction
>of the distance between the equator and the north pole (I think), based
>on the crude measurements available at the time. The foot is based on
>the length of some famous person's foot. A meter is approximately 39.37
>inches, and the inverse of that, with some scaling is ~25.4 mm/inch

10,000 kilometers, or 1E7 meters, from the equator to the north pole
along the Paris meridian. Later measurements and a better understanding
of the shape of this lump have refined the distance somewhat but that's
still a good approximation to three sig figs.

--
Rich Webb Norfolk, VA

mac

unread,
Jun 26, 2009, 8:40:19 AM6/26/09
to

> 25.4 is the Exact value. It wasn't at one time but today it is the Exact
> value.

Except in Powerpoint, where it was 2.4. I see they've fixed this.
http://support.microsoft.com/?kbid=189826

VWWall

unread,
Jun 26, 2009, 12:33:43 PM6/26/09
to
Chris Burrows wrote:
> "RogerN" <re...@midwest.net> wrote in message
> news:XMedndTLupdyoNnX...@earthlink.com...
>>
>> Found some info on this.
>>
>> http://en.wikipedia.org/wiki/Inch
>>
>> International inch
>> Effective July 1, 1959, the United States and countries of the British
>> Commonwealth defined the length of the international yard to be 0.9144
>> meters. [1] Consequently, the international inch is defined to be equal to
>> 25.4 millimeters.
>>
>
> Well I never! Was the number of furlongs per fortnight changed at the same
> time or is that the same as it always has been ;-)
>
> http://itotd.com/articles/286/furlongs-per-fortnight/
>
It's still the correct constant in the answer to the question:

"Are you getting any lately?"

--
VWW

Rich Grise

unread,
Jun 26, 2009, 2:47:17 PM6/26/09
to
On Thu, 25 Jun 2009 22:33:04 -0400, Rich Webb wrote:
> On Thu, 25 Jun 2009 21:08:25 -0400, Rube Bumpkin
>
>>No, there's no significance at all. The 25.4 value is a close
>>approximation, but not exact. A meter originally was some even fraction
>>of the distance between the equator and the north pole (I think), based
>>on the crude measurements available at the time. The foot is based on
>>the length of some famous person's foot. A meter is approximately 39.37
>>inches, and the inverse of that, with some scaling is ~25.4 mm/inch
>
> 10,000 kilometers, or 1E7 meters, from the equator to the north pole
> along the Paris meridian. Later measurements and a better understanding
> of the shape of this lump have refined the distance somewhat but that's
> still a good approximation to three sig figs.

I once had a coworker in the USAF who had been in on that missile prgram
that discovered that the earth is kinda pear-shaped - a little oblate in
the south, and a little prolate in the north.

What happened was, they calculated a trajectory, launched a missile, and
it always landed short and to the north of the target. From that, they
determined that the Earth has a bulge.

Isn't one of those inch/metric things an ezact ratio? Either the 39.37
or the 2.54?

Cheers!
Rich

DJ Delorie

unread,
Jun 26, 2009, 3:20:00 PM6/26/09
to

Rich Grise <rich...@example.net> writes:
> Isn't one of those inch/metric things an ezact ratio? Either the 39.37
> or the 2.54?

It's been pointed out that the inch has been defined as being exactly
2.54 centimeters since 1959, depending on how many of the online
references are truly trustworthy.

Given the non-repeating value, it's caused some discussion in gEDA/PCB
about changing our internal units to metric to avoid rounding errors.
It would mean our base unit is *nanometers* though, to get the inch
resolution (1E-5) we want, and limit boards to 2 meters per edge with
the default types.

DJ Delorie

unread,
Jun 26, 2009, 3:28:40 PM6/26/09
to

DJ Delorie <d...@delorie.com> writes:
> It's been pointed out that the inch has been defined as being exactly
> 2.54 centimeters since 1959, depending on how many of the online
> references are truly trustworthy.

Ah, a NIST reference:
http://physics.nist.gov/Pubs/SP447/
Specifically:
http://physics.nist.gov/Pubs/SP447/app5.pdf

"Standard Inch. The value for the inch, derived from the value for
the yard effective July 1, 1959, is exactly equivalent to 25.4
millimeters."

Jon Kirwan

unread,
Jun 26, 2009, 3:45:07 PM6/26/09
to

See this for confusion:
http://www.bipm.org/en/CGPM/db/17/1/

Jon

Paul Carpenter

unread,
Jun 26, 2009, 3:42:36 PM6/26/09
to
In article <pan.2009.06.26....@example.net>,
rich...@example.net says...

I thought most of the shape issues had been calculated and observed as
far back as the 18th Century. One experiment was to measure out known
straight line due South in the Andes, and compare lattitude with
expected. Same expedition brought back things like rubber from the
Amazon rain forests.

--
Paul Carpenter | pa...@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/> PC Services
<http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font
<http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny
<http://www.badweb.org.uk/> For those web sites you hate

DJ Delorie

unread,
Jun 26, 2009, 4:24:11 PM6/26/09
to

Jon Kirwan <jo...@infinitefactors.org> writes:
> See this for confusion:
> http://www.bipm.org/en/CGPM/db/17/1/

Why would that confuse things? If the yard/inch are defined as some
fraction of a meter, if the meter changes, the yard/inch change with
it.

Jon Kirwan

unread,
Jun 26, 2009, 4:35:05 PM6/26/09
to

I wasn't talking about the ratio that you wrote about. You just
reminded me that recently a meter was redefined as the length traveled
by light in vacuum in 1/299782458 seconds, so the unit is determined
in terms of another fundamental unit -- time. That's a change from
prior definitions based upon atomic transitions. Sorry I wasn't
clear. There have been a lot of redefinitions as tools improved
rapidly, of late.

Jon

Grant Edwards

unread,
Jun 26, 2009, 4:37:47 PM6/26/09
to
On 2009-06-26, Jon Kirwan <jo...@infinitefactors.org> wrote:

>>"Standard Inch. The value for the inch, derived from the value
>> for the yard effective July 1, 1959, is exactly equivalent to
>> 25.4 millimeters."
>
> See this for confusion:
> http://www.bipm.org/en/CGPM/db/17/1/

I don't get it. What's so confusing about it? Though not
great prose, it seems clear enough

--
Grant Edwards grante Yow! We just joined the
at civil hair patrol!
visi.com

Jon Kirwan

unread,
Jun 26, 2009, 4:47:20 PM6/26/09
to
On Fri, 26 Jun 2009 15:37:47 -0500, Grant Edwards <invalid@invalid>
wrote:

>On 2009-06-26, Jon Kirwan <jo...@infinitefactors.org> wrote:
>
>>>"Standard Inch. The value for the inch, derived from the value
>>> for the yard effective July 1, 1959, is exactly equivalent to
>>> 25.4 millimeters."
>>
>> See this for confusion:
>> http://www.bipm.org/en/CGPM/db/17/1/
>
>I don't get it. What's so confusing about it? Though not
>great prose, it seems clear enough

See my other recent response.

Jon

nospam

unread,
Jun 26, 2009, 4:51:15 PM6/26/09
to
DJ Delorie <d...@delorie.com> wrote:

>Given the non-repeating value, it's caused some discussion in gEDA/PCB
>about changing our internal units to metric to avoid rounding errors.
>It would mean our base unit is *nanometers* though, to get the inch
>resolution (1E-5) we want, and limit boards to 2 meters per edge with
>the default types.

A base unit of 1/12.7E6 inch would give integer representation of 10 micro
inches and 10nm with a bit more than +/-4 meters range from a 32bit int.

Doesn't that work out better all round?

--

DJ Delorie

unread,
Jun 26, 2009, 5:04:33 PM6/26/09
to

nospam <nos...@please.invalid> writes:
> A base unit of 1/12.7E6 inch would give integer representation of 10 micro
> inches and 10nm with a bit more than +/-4 meters range from a 32bit int.

I.e. a 2nm unit. Yeah, but who has boards bigger than 2 meters?

Rich Grise

unread,
Jun 26, 2009, 7:27:12 PM6/26/09
to

It's just a confusing web page.

Say, are we sure that the Universe is expanding, or are we shrinking,
so that the rest of the Universe only _looks_ like it's expanding? ;-)

Cheers!
Rich

Rich Grise

unread,
Jun 26, 2009, 7:32:31 PM6/26/09
to

That could very well be the case - maybe what was significant at the time
is that they did it in rockets, and/or that the "discovery" was reported
in Time magazine, in about a 6-page spread with color glossy artists'
conceptions and stuff. :-)

Thanks!
Rich


Grant Edwards

unread,
Jun 26, 2009, 8:27:24 PM6/26/09
to

Seriosly. Are there people using gEDA (or any other CAD
program) to layout boards bigger then 2m?

--
Grant

Joel Koltner

unread,
Jun 26, 2009, 8:50:11 PM6/26/09
to
"Grant Edwards" <gra...@visi.com> wrote in message
news:wcSdnUJbyIfx-tjX...@posted.usinternet...

> Seriosly. Are there people using gEDA (or any other CAD
> program) to layout boards bigger then 2m?

And if they are, what software do they currently use? If one can afford to
build 2m PCBs the costs of the layout software is probably negligible anyway.

Some years ago Delorme took their Street Atlas USA software and split it up
into various versions (basic/deluxe/commercial/etc.)... one of the compalints
of people with the new version was that the cheap version (but not cheaper
than the old version) refused to print to anything larger than 11x17. Most
annoying to cripple software like that...


DJ Delorie

unread,
Jun 26, 2009, 8:56:46 PM6/26/09
to

"Joel Koltner" <zapwireD...@yahoo.com> writes:
> And if they are, what software do they currently use? If one can afford to
> build 2m PCBs the costs of the layout software is probably negligible anyway.

If they are, they can rebuild PCB on a 64-bit platform too ;-)

(if anyone complains that they need a PCB bigger than the galaxy, let
them buy a 128-bit platform ;)

CBFalconer

unread,
Jun 26, 2009, 6:57:26 PM6/26/09
to
John Larkin wrote:
> "RogerN" <re...@midwest.net> wrote:
>
... snip 110 useless lines ...

>
>> 25.4 is the Exact value. It wasn't at one time but today it is
>> the Exact value.
>
> I read somewhere that, in the early days of IC layout, the x-acto
> + rubylith times, they used 25.

Did this exquisite reply really require quoting 110 useless lines?

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.


CBFalconer

unread,
Jun 26, 2009, 9:12:16 PM6/26/09
to

Consider relativity, as expounded by Einstein about 1905.

John Larkin

unread,
Jun 26, 2009, 10:14:52 PM6/26/09
to
On Fri, 26 Jun 2009 18:57:26 -0400, CBFalconer <cbfal...@yahoo.com>
wrote:

>John Larkin wrote:
>> "RogerN" <re...@midwest.net> wrote:
>>
>... snip 110 useless lines ...
>>
>>> 25.4 is the Exact value. It wasn't at one time but today it is
>>> the Exact value.
>>
>> I read somewhere that, in the early days of IC layout, the x-acto
>> + rubylith times, they used 25.
>
>Did this exquisite reply really require quoting 110 useless lines?

My computer has things called "scroll bars."

John

Paul Keinanen

unread,
Jun 27, 2009, 12:32:28 AM6/27/09
to
On Fri, 26 Jun 2009 20:42:36 +0100, Paul Carpenter
<pa...@pcserviceselectronics.co.uk> wrote:

>
>I thought most of the shape issues had been calculated and observed as
>far back as the 18th Century. One experiment was to measure out known
>straight line due South in the Andes, and compare lattitude with
>expected. Same expedition brought back things like rubber from the
>Amazon rain forests.

In order to determine the shape of Earth, you had to measure the
absolute distance between two latitudes (measured in degrees by
astronomical means) to determine the size of a latitude degree. These
measurements have to be done both close to the Equator as well as
close to the Pole.

This was first done by the French Geodesic Mission
http://en.wikipedia.org/wiki/French_Geodesic_Mission with one
expedition sent to current Ecuador, while the "polar" expedition was
sent into the Torne river valley in Lapland led by Pierre Maupertuis.

Paul

Paul Keinanen

unread,
Jun 27, 2009, 12:49:04 AM6/27/09
to
On Fri, 26 Jun 2009 19:27:24 -0500, Grant Edwards <gra...@visi.com>
wrote:

Are such huge PCBs actually used ?

There would be problems with the mechanical support, thermal expansion
and hygroscopic effects with such huge boards.

The only use I can think of for such huge boards would be some
(micro)stripline filters and transmission lines for VHF or lower UHF
and perhaps for constructing large patch antennas with some active
electronics integrated between the patches.

Paul

George Neuner

unread,
Jun 27, 2009, 1:34:50 AM6/27/09
to
On Fri, 26 Jun 2009 19:14:52 -0700, John Larkin
<jjla...@highNOTlandTHIStechnologyPART.com> wrote:

>On Fri, 26 Jun 2009 18:57:26 -0400, CBFalconer <cbfal...@yahoo.com>
>wrote:
>

>>Did this exquisite reply really require quoting 110 useless lines?
>
>My computer has things called "scroll bars."

So, because of that, you quoted 4140 unnecessary characters, wasted
our time having to scroll past them and figure out what you actually
were replying to, and also wasted who knows how much bandwidth to
download it and local storage to look at it?

How many copies of your message do you figure have been made?

George

Paul Carpenter

unread,
Jun 27, 2009, 4:25:33 AM6/27/09
to
In article <fr6b45lksgre5ssjk...@4ax.com>, kein...@sci.fi
says...

> On Fri, 26 Jun 2009 20:42:36 +0100, Paul Carpenter
> <pa...@pcserviceselectronics.co.uk> wrote:
>
> >
> >I thought most of the shape issues had been calculated and observed as
> >far back as the 18th Century. One experiment was to measure out known
> >straight line due South in the Andes, and compare lattitude with
> >expected. Same expedition brought back things like rubber from the
> >Amazon rain forests.
>
> In order to determine the shape of Earth, you had to measure the
> absolute distance between two latitudes (measured in degrees by
> astronomical means) to determine the size of a latitude degree. These
> measurements have to be done both close to the Equator as well as
> close to the Pole.
>
> This was first done by the French Geodesic Mission
> http://en.wikipedia.org/wiki/French_Geodesic_Mission with one

That was the one whose name escaped me, and had a very interesting story
from starting off spending the expedition's money on a hooker in the
West Indies...

> expedition sent to current Ecuador, while the "polar" expedition was
> sent into the Torne river valley in Lapland led by Pierre Maupertuis.
>
> Paul
>
>

--

Paul Carpenter

unread,
Jun 27, 2009, 4:30:04 AM6/27/09
to
In article <pan.2009.06.27....@example.net>,
rich...@example.net says...

> On Fri, 26 Jun 2009 20:42:36 +0100, Paul Carpenter wrote:
> > In article <pan.2009.06.26....@example.net>,
> > rich...@example.net says...
> >> On Thu, 25 Jun 2009 22:33:04 -0400, Rich Webb wrote:
> >> > On Thu, 25 Jun 2009 21:08:25 -0400, Rube Bumpkin
> >> >
....

> >> >
> >> > 10,000 kilometers, or 1E7 meters, from the equator to the north pole
> >> > along the Paris meridian. Later measurements and a better understanding
> >> > of the shape of this lump have refined the distance somewhat but that's
> >> > still a good approximation to three sig figs.
> >>
> >> I once had a coworker in the USAF who had been in on that missile prgram
> >> that discovered that the earth is kinda pear-shaped - a little oblate in
> >> the south, and a little prolate in the north.
> >>
> >> What happened was, they calculated a trajectory, launched a missile, and
> >> it always landed short and to the north of the target. From that, they
> >> determined that the Earth has a bulge.
> >
> > I thought most of the shape issues had been calculated and observed as
> > far back as the 18th Century. One experiment was to measure out known
> > straight line due South in the Andes, and compare lattitude with
> > expected. Same expedition brought back things like rubber from the
> > Amazon rain forests.
>
> That could very well be the case - maybe what was significant at the time
> is that they did it in rockets, and/or that the "discovery" was reported
> in Time magazine, in about a 6-page spread with color glossy artists'
> conceptions and stuff. :-)

Sounds like people had not done their research as the shape of the Earth
mattered to map makers, and navigation long before rockets.

Re-inventing the wheel, and putting a marketing spin on why things went
wrong.

Does not sound good to me, but typical of large projects based on
technology 'silver bullet' blindness, without fully researching
and understanding the problems.

Paul Keinanen

unread,
Jun 27, 2009, 6:13:41 AM6/27/09
to
On Sat, 27 Jun 2009 09:30:04 +0100, Paul Carpenter
<pa...@pcserviceselectronics.co.uk> wrote:

>In article <pan.2009.06.27....@example.net>,
>rich...@example.net says...
>> On Fri, 26 Jun 2009 20:42:36 +0100, Paul Carpenter wrote:
>> > In article <pan.2009.06.26....@example.net>,
>> > rich...@example.net says...
>> >> On Thu, 25 Jun 2009 22:33:04 -0400, Rich Webb wrote:
>> >> > On Thu, 25 Jun 2009 21:08:25 -0400, Rube Bumpkin
>> >> >

>> >> I once had a coworker in the USAF who had been in on that missile prgram


>> >> that discovered that the earth is kinda pear-shaped - a little oblate in
>> >> the south, and a little prolate in the north.
>> >>
>> >> What happened was, they calculated a trajectory, launched a missile, and
>> >> it always landed short and to the north of the target. From that, they
>> >> determined that the Earth has a bulge.
>> >
>> > I thought most of the shape issues had been calculated and observed as
>> > far back as the 18th Century. One experiment was to measure out known
>> > straight line due South in the Andes, and compare lattitude with
>> > expected. Same expedition brought back things like rubber from the
>> > Amazon rain forests.
>>
>> That could very well be the case - maybe what was significant at the time
>> is that they did it in rockets, and/or that the "discovery" was reported
>> in Time magazine, in about a 6-page spread with color glossy artists'
>> conceptions and stuff. :-)
>
>Sounds like people had not done their research as the shape of the Earth
>mattered to map makers, and navigation long before rockets.

The geoid (the equipotential water level assuming no tide or wind
effects) differs about +/-100 m from the reference ellipsoid
http://en.wikipedia.org/wiki/File:Geoid_height_red_blue.png

This variation of the gravitational field would attract the rocket
during the whole trajectory, causing some deviation from the expected
target.

I don't see how these gravitational variations could be mapped
accurately before orbiting satellites (by measuring their deviation
from the theoretical orbit).

On the Moon, the mascons (mass concentrations) cause so much gravtiy
field anomaly that a lunar satellite will crash to the Moon within
months or a year, unless active orbital corrections are made.

Paul

MooseFET

unread,
Jun 27, 2009, 10:46:48 AM6/27/09
to
On Jun 27, 3:13 am, Paul Keinanen <keina...@sci.fi> wrote:
> On Sat, 27 Jun 2009 09:30:04 +0100, Paul Carpenter
>
>
>
> <p...@pcserviceselectronics.co.uk> wrote:
> >In article <pan.2009.06.27.00.30.35.438...@example.net>,
> >richgr...@example.net says...

> >> On Fri, 26 Jun 2009 20:42:36 +0100, Paul Carpenter wrote:
> >> > In article <pan.2009.06.26.19.45.27.661...@example.net>,
> >> > richgr...@example.net says...

> >> >> On Thu, 25 Jun 2009 22:33:04 -0400, Rich Webb wrote:
> >> >> > On Thu, 25 Jun 2009 21:08:25 -0400, Rube Bumpkin
>
> >> >> I once had a coworker in the USAF who had been in on that missile prgram
> >> >> that discovered that the earth is kinda pear-shaped - a little oblate in
> >> >> the south, and a little prolate in the north.
>
> >> >> What happened was, they calculated a trajectory, launched a missile, and
> >> >> it always landed short and to the north of the target. From that, they
> >> >> determined that the Earth has a bulge.
>
> >> > I thought most of the shape issues had been calculated and observed as
> >> > far back as the 18th Century. One experiment was to measure out known
> >> > straight line due South in the Andes, and compare lattitude with
> >> > expected. Same expedition brought back things like rubber from the
> >> > Amazon rain forests.
>
> >> That could very well be the case - maybe what was significant at the time
> >> is that they did it in rockets, and/or that the "discovery" was reported
> >> in Time magazine, in about a 6-page spread with color glossy artists'
> >> conceptions and stuff. :-)
>
> >Sounds like people had not done their research as the shape of the Earth
> >mattered to map makers, and navigation long before rockets.
>
> The geoid (the equipotential water level assuming no tide or wind
> effects) differs about +/-100 m from the reference ellipsoidhttp://en.wikipedia.org/wiki/File:Geoid_height_red_blue.png

>
> This variation of the gravitational field would attract the rocket
> during the whole trajectory, causing some deviation from the expected
> target.
>
> I don't see how these gravitational variations could be mapped
> accurately before orbiting satellites (by measuring their deviation
> from the theoretical orbit).

If you measure the distance between two points and the angle of that
short line repeatedly, you can produce a measure of a curve. The
distance measurement can be done with survey methods of
triangulation. The angle measurement can be done by sighting stars.

CBFalconer

unread,
Jun 27, 2009, 8:18:05 PM6/27/09
to
MooseFET wrote:
> Paul Keinanen <keina...@sci.fi> wrote:
>
... snip about 60 useless lines ...

>
>> I don't see how these gravitational variations could be mapped
>> accurately before orbiting satellites (by measuring their
>> deviation from the theoretical orbit).
>
> If you measure the distance between two points and the angle of
> that short line repeatedly, you can produce a measure of a curve.
> The distance measurement can be done with survey methods of
> triangulation. The angle measurement can be done by sighting
> stars.

The above is roughly how your reply SHOULD have been snipped.

Some useful links on quoting:
<http://www.xs4all.nl/%7ewijnands/nnq/nquote.html>
<http://www.complang.tuwien.ac.at/anton/mail-news-errors.html>
<http://www.netmeister.org/news/learn2quote2.html>
<http://www.star-one.org.uk/computer/format.htm>

Paul Keinanen

unread,
Jun 28, 2009, 12:14:50 AM6/28/09
to
On Sat, 27 Jun 2009 07:46:48 -0700 (PDT), MooseFET
<kens...@rahul.net> wrote:

>On Jun 27, 3:13�am, Paul Keinanen <keina...@sci.fi> wrote:
>> On Sat, 27 Jun 2009 09:30:04 +0100, Paul Carpenter
>>
>>
>>
>> <p...@pcserviceselectronics.co.uk> wrote:
>> >In article <pan.2009.06.27.00.30.35.438...@example.net>,
>> >richgr...@example.net says...
>> >> On Fri, 26 Jun 2009 20:42:36 +0100, Paul Carpenter wrote:
>> >> > In article <pan.2009.06.26.19.45.27.661...@example.net>,
>> >> > richgr...@example.net says...
>> >> >> On Thu, 25 Jun 2009 22:33:04 -0400, Rich Webb wrote:
>> >> >> > On Thu, 25 Jun 2009 21:08:25 -0400, Rube Bumpkin
>>
>> >> >> I once had a coworker in the USAF who had been in on that missile prgram
>> >> >> that discovered that the earth is kinda pear-shaped - a little oblate in
>> >> >> the south, and a little prolate in the north.

I remember hearing that story decades ago. However, looking at the
current maps showing the difference between the geoid and the
reference ellipsoid, it is hard to think about pear.

To be pear-shaped, there would have to be a deep depression at
Antarctica, which does not exist, according to current measurements.

>> >> >> What happened was, they calculated a trajectory, launched a missile, and
>> >> >> it always landed short and to the north of the target. From that, they
>> >> >> determined that the Earth has a bulge.

Looking only at geometry, a bulge before or around the target would
cause a premature impact point only if the missile approached the
target in a _very_ shallow angle. A 100 m bulge and 3 degree approach
angle (e.g. airport ILS approach) would cause an impact 2 km
prematurely.

In my understanding the ballistic missiles of those days approached
the target nearly vertically, so the bulge would affect the impact
point only a few meters, although the impact would happen perhaps 100
ms earlier than calculated.

The reason for the "bulge" is that the mass below the Earth's surface
is not evenly distributed, i.e. there are low density materials (and
hence less mass and less gravitation) below the bulges. The varying
gravitational force along the whole flight path will cause deviations
in the flight path of the missile.



>> I don't see how these gravitational variations could be mapped
>> accurately before orbiting satellites (by measuring their deviation
>> from the theoretical orbit).
>
>If you measure the distance between two points and the angle of that
>short line repeatedly, you can produce a measure of a curve. The
>distance measurement can be done with survey methods of
>triangulation. The angle measurement can be done by sighting stars.

This is exactly what the French Geodesic Mission did in the 18th
century :-). However, you can only determine the diameter of the Earth
measured on the equator and on the poles, but you can not map local
variations in the gravitational field by that method.

Fortunately the two triangulation networks used by the FGM (one in
Ecuador and the other in Scandinavia) happened to be on two separate
"bulges", compensating for some of the errors. However, if one network
had been on a bulge and the other in a depression, the error would
have been larger.

Paul

Nobody

unread,
Jun 28, 2009, 2:15:00 AM6/28/09
to
On Sat, 27 Jun 2009 07:46:48 -0700, MooseFET wrote:

>> I don't see how these gravitational variations could be mapped
>> accurately before orbiting satellites (by measuring their deviation
>> from the theoretical orbit).
>
> If you measure the distance between two points and the angle of that
> short line repeatedly, you can produce a measure of a curve. The
> distance measurement can be done with survey methods of
> triangulation. The angle measurement can be done by sighting stars.

This is easier said than done.

If you only perform these measurements over small distances, or only
have limited accuracy, you only end up with the parameters for a spheroid
which fits the region being surveyed.

This is why you have multiple geodetic datums (for whatever reason, no-one
uses the latin plural "data" in this context), each of which provides a
spheroidal approximation to the geoid which is a close fit for a specific
area.

The following diagram shows the location of a specific coordinate in a
variety of datums:

http://www.colorado.edu/geography/gcraft/notes/datum/gif/shift.gif

[The Tokyo datum is so far out as Japan lies on a relatively steep slope
in the geoid, so the best-fit ellipsoid to that area is rather skewed.]

Tying these together requires surveying large areas with a high degree of
accuracy. The first major attempts at tying regional datums together
were the traverses conducted using the SHORAN and HIRAN distance measuring
systems starting in the 1950s.

Obtaining this level of accuracy over long distances simply wasn't
feasible until quite recently.

More information:

http://www.floridageomatics.com/publications/gfl/toc.htm
http://www.colorado.edu/geography/gcraft/notes/datum/datum.html


BartC

unread,
Jun 28, 2009, 12:59:28 PM6/28/09
to

"RogerN" <re...@midwest.net> wrote in message
news:XMedndTLupdyoNnX...@earthlink.com...

> The Canadian Parliament in 1951 established their inch based on a legal
> definition of the yard as 0.9144 m. This ratio defined the inch as 25.4
> mm, a third definition of the inch. The Canadian inch was about 2 parts in
> 106 smaller than the U.S. standard and about 2 parts in 106 larger than
> the British standard.

You mean, 2 parts in 10^6? Otherwise the US mile would be about 200 feet
longer than the British one.

--
Bartc

John Larkin

unread,
Jun 28, 2009, 4:27:37 PM6/28/09
to

Google "usenet complaint form". Enjoy.

John

CBFalconer

unread,
Jun 28, 2009, 6:09:30 PM6/28/09
to
John Larkin wrote:
> George Neuner <gneu...@comcast.net> wrote:

>> John Larkin <jjla...@highNOTlandTHIStechnologyPART.com> wrote:
>>> CBFalconer <cbfal...@yahoo.com> wrote:
>>>
>>>> Did this exquisite reply really require quoting 110 useless
>>>> lines?
>>>
>>> My computer has things called "scroll bars."
>>
>> So, because of that, you quoted 4140 unnecessary characters,
>> wasted our time having to scroll past them and figure out what
>> you actually were replying to, and also wasted who knows how
>> much bandwidth to download it and local storage to look at it?
>>
>> How many copies of your message do you figure have been made?
>
> Google "usenet complaint form". Enjoy.

Learning to cooperate with the Usenet community is somewhat more
useful than this silly childish attitude.

--

John Larkin

unread,
Jun 28, 2009, 8:58:10 PM6/28/09
to
On Sun, 28 Jun 2009 18:09:30 -0400, CBFalconer <cbfal...@yahoo.com>
wrote:

>John Larkin wrote:
>> George Neuner <gneu...@comcast.net> wrote:
>>> John Larkin <jjla...@highNOTlandTHIStechnologyPART.com> wrote:
>>>> CBFalconer <cbfal...@yahoo.com> wrote:
>>>>
>>>>> Did this exquisite reply really require quoting 110 useless
>>>>> lines?
>>>>
>>>> My computer has things called "scroll bars."
>>>
>>> So, because of that, you quoted 4140 unnecessary characters,
>>> wasted our time having to scroll past them and figure out what
>>> you actually were replying to, and also wasted who knows how
>>> much bandwidth to download it and local storage to look at it?
>>>
>>> How many copies of your message do you figure have been made?
>>
>> Google "usenet complaint form". Enjoy.
>
>Learning to cooperate with the Usenet community is somewhat more
>useful than this silly childish attitude.

Useful to whom?

John


Albert van der Horst

unread,
Jun 30, 2009, 8:24:22 AM6/30/09
to
In article <4A3EBFE9...@yahoo.com>,
CBFalconer <cbfal...@maineline.net> wrote:
>Jon Kirwan wrote:
>> CBFalconer <cbfal...@yahoo.com> wrote:
>>
>>><snip>
>>>
>>> My earlier answer was almost accurate, but I ran my program with
>>> the wrong input. Try:
>>>
>>> [1] c:\c\ratapprx>ratapprx 3.175
>>> Usage: ratvalue [number [maxnumerator]]
>>> number defaults to PI, maxnumerator to 500
>>> Rational approximation to 3.175000000000000
>>> 2 / 1 = 2.000000000000000 with error 1.175000000000000
>>> 3 / 1 = 3.000000000000000 with error 0.175000000000000
>>> 10 / 3 = 3.333333333333333 with error 0.158333333333334
>>> 13 / 4 = 3.250000000000000 with error 0.075000000000000
>>> 16 / 5 = 3.200000000000000 with error 0.025000000000000
>>> 19 / 6 = 3.166666666666667 with error 0.008333333333333
>>> 35 / 11 = 3.181818181818182 with error 0.006818181818182
>>> 54 / 17 = 3.176470588235294 with error 0.001470588235294
>>> 73 / 23 = 3.173913043478261 with error 0.001086956521739
>>> 127 / 40 = 3.175000000000000 with error 0.000000000000000
>>>
>>> So my comment about errors is nonsense.
>>
>> No problem. By the way, I only provide convergents. Just keep that
>> in mind. The CF for 3.175 is [3;5,1,2,1,1]. This means exactly 6
>> convergents. Which is what you saw me post.
>
>I don't know what you mean by 'convergents' or 'CF'.

I do. You should read up about them, before commenting to the net.
CF is Continued Fraction obviously.

>ratapprx
>reports every value that reduces the error from the previous
>trial. Note the continuous reduction in error. Errors are
>absolute values.

It is highly advisable to understand CF's before attempting
approximation programs. I doubt the c-program takes advantage.

Striking fact about CF's. If you need a value to N digits,
there is an approximation A/B where both A and B are limited
to N/2 digits.

This has an application in 1 bit D/A converters. With 16 bit timers
you can have a 32 bit precision average DC output for any value.
(Provided your clock is jitter free enough to accomodate this.)
(Oops giving away a patent ...)

>--
> [mail]: Chuck F (cbfalconer at maineline dot net)

Groetjes Albert

--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Bill Davy

unread,
Jun 30, 2009, 12:02:29 PM6/30/09
to
"Albert van der Horst" <alb...@spenarnc.xs4all.nl> wrote in message
news:km1x4...@spenarnc.xs4all.nl...


You can never "give away" a patent which requires disclosure such that
anybody "skilled in the art" has the necessary knowledge.


CBFalconer

unread,
Jun 30, 2009, 7:33:30 PM6/30/09
to
Albert van der Horst wrote:
> CBFalconer <cbfal...@maineline.net> wrote:
>
... snip ...

>
>> I don't know what you mean by 'convergents' or 'CF'.
>
> I do. You should read up about them, before commenting to the
> net. CF is Continued Fraction obviously.
>
>> ratapprx reports every value that reduces the error from the
>> previous trial. Note the continuous reduction in error. Errors
>> are absolute values.
>
> It is highly advisable to understand CF's before attempting
> approximation programs. I doubt the c-program takes advantage.

You obviously didn't read either the ratapprx program or my
message. The uncertainty was about "what you mean". Note the
'you'. ratapprx doesn't do approximations, it does exact
calculations (within the limits of the floating point system).
Each answer is the next best approximation with a larger
numerator. Thus no need of convergents.

>
> Striking fact about CF's. If you need a value to N digits,
> there is an approximation A/B where both A and B are limited
> to N/2 digits.

I saw no sign of continued fractions. I saw no need of
approximations. Thus I asked questions and avoided snotty
comments.

--
[mail]: Chuck F (cbfalconer at maineline dot net)

Datesfat Chicks

unread,
Jul 2, 2009, 2:00:47 PM7/2/09
to
"Jon Kirwan" <jo...@infinitefactors.org> wrote in message
news:77jq35pcq11vrhg19...@4ax.com...
> Okay. I think I'm done playing, for now. There's a free continuous
> fraction program available. This program provides the convergents for
> the continuous fractions of a value (plus declining error terms) and
> includes a well-featured calculator (with variable assignment support
> and multi-statement capability (use a ; to separate statements or
> expressions, or just type them one line at a time) and displays
> floating point notation in either single or double precision (the
> calculator itself can be switched to either mode.) So it may have a
> variety of practical uses for folks in embedded work of one kind or
> another.

Thanks for all. My more limited program is here:

http://www.dtashley.com/howtos/2007/01/best_rational_approximation/

Datesfat

0 new messages