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:
>
formatting link
>
> 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)
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.
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...
"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.
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"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
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.
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.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]:
Try the download section.
CF (continued fraction) and convergent, if you look it up, is explicitly defined. See Wiki:
formatting link
I think another term for it is approximant.
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.
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:
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.
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.
"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."
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.