» Goto page Previous  1, 2, 3  Next
I'm up to 178 conversions programmed into this thing so far, with at least 3 more categories to fill. This is one massive program. :<
elfprince was awesome and set me up with some code to utilize imaginary and real numbers to do some serious optimizing. The 178 conversions before took up over 8kb in size. Sadly, the TI-73 and TI-82 lack those functions, so, I simplified what he had done so it's more easily cross-compatible (and more easy for me to cheat by copy pasting code from one window to another in Tokens and just modifying code here and there to make it work on all calcs).

I still need to compress the Volume and Weight categories. I think I'll do that when I wake back up.

elfprince suggested adding c (speed of light) to the speed conversions. That makes it have.. 188 conversions, technically. Hooray for adding one little conversion and it technically adds 10
Here are my thoughts on this:
Pressure, Temperature, Speed, and Length/Area/Volume look pretty good.

On weight/mass, and on Power/Torque/Work/Force, there are some confusions to be worked out.

• The units you give for mass are all good, and technically not weight at all (which is actually a measure of force). Pound can be used as both a measure of mass or a measure of force (with slightly different but closely related definitions), so these are often confused in American units. Additionally, it might be worthwhile to add Stone, and Slug as units of mass for conversion.
• For force, which is defined as mass * length / (time^2), I would recommend providing the following:
• Newtons
• Newton (N)
• Dynes (dyn)
• Pounds (lbf)
• Poundal (lbl)

• Energy/Work/Torque are analytically the same unit (mass)*(length^2)/(time^2), however Work is a subset of Energy, and Torque is conceptually different (it's really Energy / Radian, but radians don't have a real unit). I would separate Energy/Work into one category, and Torque into another. Good units of energy to provide conversions for are the following:

• Joules (J)
• electron-Volts (eV)
• kilowatt-hours (kWh)
• Btu
• Calories (C or kcal) and calories (c). Take your pick, but the first will probably be less confusing.
• Ergs
• Tonne of TNT

Good units of Torque to provide conversions for are the following:

• Newton-metre (N•m) and Joule / radian are equivalent. N•m is the more common notation.
• Pound-feet (lb•ft)
• Ounce-Inches (Oz•in)

• Power is also its whole own thing (Energy / Time). Watts, Horsepower, and Ergs / second= are the big three here.

For all systems of units it would be fun/cute to include conversions to and from Planck units, where those can be represented within the numerical limitations of the calculator.
In regards to what Power/Torque/workforce used to be:

Text(8,5,"HP -> KW
Text(14,5,"KW -> HP
Text(20,5,"IN LB -> NM
Text(26,5,"FT LB -> NM
Text(32,5,"NM -> IN LB
Text(38,5,"NM -> FT LB

It was based on automotive conversions. And that's why it hasn't been worked on yet, since I wanted to find a good listing of that particular subject, I just haven't done so yet. I'm honestly not sure how I want to set that one up. I'm also thinking about adding Time to the mix.

I think for the Power/Torque/Work Force, I might have to split that up into 3 categories to do them properly.
blue_bear_94 wrote:
Definitely include grams, kilograms, ounces, and pounds. Carats or tons may come in handy sometimes, but I don't think many people use stones nowadays.

tifreak8x wrote:
Alright, seems to have some others thinking the same, so stones will be dropped. Anything I should replace it with? Going to update the list now.

Just to weigh in on this: several of my Brit and Kiwi friends give their weight in stone, and my friends who are into horses give weight in stone all the time as well.
Huh, alright, it's not a huge thing to add back in Will do, definitely don't want to exclude anyone over in the EU from wanting to use this!
Yes, I'm double posting, but this is kind of a separate thing and didn't want to just dump it onto the one above.

Lists:

Temp:

►K{(5/9),459.67,1,273.15,1,0,(5/9),0->L1
K►{(9/5),~459.67*(5/9),1,~273.15,1,0,(9/5),0->L2

{F,C,K,R

Pressures:

►PSI{1,14.5037738,.000145037738,14.22334330712,14.6959498,.0193367747->L1
PSI►{1,.0689475729,6894.75729,.0703069578296,.0680459639,51.7149326->L2

{psi,bar,pa,at,atm,torr

Speed/Velocity:

►ft/s{3.28085,.911344,1,1.46667,1.68780986,983571056.4304->L1
ft/s►{.3048,1.09728,1,.681818,.592483801,.000000001016703362164->L2

{m/s,kph,ft/s,mph,knot,c

Weight/Mass:

►g{.2,1,1000,28.3495,453.592,907185,1000000,6350.29->L1
g►{5,1,.001,.035274,.00220462,.00000110231,.000001,.000157473044->L2

{ct,g,kg,oz,lb,ton,tonne,stone

Volume

►L{1,.001,1000,3.78541178,.0163871,28.3168466,.946352946,.473176473,.0295735296,.236588236->L1
L►{1,1000,.001,.264172052,61.0237,.0353147,1.05668821,2.11338,33.8140227,4.22675284->L2

{L,cu cm, cu m,gal,cu in,cu ft,qt,pt,oz,cup

Length

►m{.3048000000012192,.025400000025908,.9143999986101121,1609.344000614692,.01,1,1000,1852,4828.041700099944,201.16799991496225,1.8288000005647336,9460528409678268,17987547480,299792458->L1
m►{3.280839895,39.3700787,1.0936133,.000621371192,100,1,.001,.000539956803,.00020712331461,.00497096954,.546806649,.000000000000000105702341,.0000000000555940158664,.00000000333564095198->L2

{ft,in,yd,mi,cm,m,km,nmk,lea,fur,ftm,ly,lm,ls

Time

►day{.00000000000001157407407,.00000000001157407407,.00000001157407407407,.00001157407407407,.0006944444444444,.04166666666667,1,7,14,30.43776580833,365,3650,36500,365000->L1
day►{86400000000000,86400000000,86400000,86400,1440,24,1,.1428571428571,.07142857142857,.03285392253482,.002739726027397,.00002739726027397,.00002739726027397,.000002739726027397->L2

Area

►m²{.0001,.09290304,.00064516,100000,1,25789988.110336,.000001,.83612736->L1
m²►{1000,10.76391041671,1550.003100006,.000001,1,.0000003861021585245,1000000,1.195990046301->L2

{cm²,ft²,in²,km²,m²,mile²,mm²,yd²

Torque
►NM{1,.737562149,8.85074576738,141.611932278->L1
NM►{1,1.35581795,.112984829333,.00706155183333->L2

{NM,LB FT,LN IN,OZ IN

Energy/Work

►J{1,.0000000000000000001602176462,36000000,1055.056,4186.8,.0000007,4184000000->L1
J►{1,6241509744512000000,.0000002777777777778,.0009478169879134,.0002388458966275,10000000,.0000000002390057361377->L2

{J,EV,KWH,BTU,KCAL,ERG,TNT

These are the lists as they are entered into the program. Working on distances right now. Essentially, I'm going to need help on making sure that these are accurate and have a high enough decimal precision.

The letter to the left of all the numbers is the base unit. The placement of the arrow indicates whether it's being converted to the unit, or converted to a target unit. It all corresponds to the lists below the numbers.
Okay, I've updated the front page with what I've got going on. I haven't gotten the Time stuff typed out to Tokens yet, I'll do that tomorrow sometime and make it displayable. I still need to work on Area and figure out what I want to do in regards to the Power/Torque/Work Force category. Thinking about breaking it up a bit, and maybe add other categories.

Elfprince had posted up something I need to review and see exactly what he had said, since I've gotten distracted and went and forgot. Something to do with energy and other things.

I also set it up so it can multi-page fairly well, and I'm happy with how well that works.

If anyone wants to suggest things they think are missing in that list on the front page, PLEASE feel free to say something! I'm definitely more than willing to add to that list and make it as complete as possible!
My response to save a few more bytes, for all of the non-temperature lists, you should be able to just

Code:
`L1⁻¹→L2`
Well, I still have to verify the values that were written in already, which is going to take a bit of work to do. But as I had mentioned on Volume I think it was, there were a couple that the values didn't match at all.

Also, if you have any suggestions on which units for Area I should focus on, that'd be awesome.

Edit:

http://www.unit-conversion.info/area.html

Going to utilize that list there for Area. Will include cm^2,ft^2,in^2,km^2,m^2,mile^2,mm^2,yd^2.
When I looked at it yesterday all of the volume things matched up that way. Also, mathematically that has to be what it's doing, because to (for example) convert between miles and feet and back again, you have to do

Code:
`miles = feet / 5280 = feet * (5280^-1)`

and

Code:
`feet = miles * 5280 = miles * ((1/5280)^-1)`

so

Code:
`miles = (miles * 5280) * (5280^-1)`

and

Code:
`feet = (feet * 5280^-1) * 5280`
Got Torque done, all that's left is Energy/Work category. Then I'll get to go through and check all my equations so I can make sure I have enough decimal places put in for precision. Then make it work for all the other calc models. 644 Conversions, just over 7400 bytes in size. Not doing bad at all, me thinks.
Awesome work! Do you have any screenshots of the multipage conversion stuff?
Wow, that is amazing o.o 644 conversions? That is 11 to 12 bytes each, and not all of those are simple!
@elfprince, I can see about getting one worked up, haven't made any new screen shots, recently.

@xeda: It's more along the lines of converting all the conversions to 1 type, then converting them all back, using the lists in one of the posts above.

Thanks for your continued support, guys!
I think, if my math is right (I really should go investigate THAT as well) TIFC can do 686 conversions. Such insanity, right?

Well, the next step is to go through the lists, verify I have enough decimal places put in, as apparently google is lazy and only goes like 4-5 decimal places in, when other sources go up to 10-12. Once I get that finished, going to look into elfprince's possible optimization. If I can do it to just a couple of them, life would be awesome.

TIFC is over 8kb now. Going to start dropping it on the other calcs once the above is finished. Screenshots will come soon.

Edit: Just did the math, it's only 674 conversions. Bummer. :p
Wow, are you doing this directly on the calculator, or with Tokens or Source Coder?
With Tokens So so so so much faster to write in that way for me. And since Tokens now supports 73/82/83 BASIC, porting to those will be mostly copy/paste and the 73 needs a couple of the tokens changed.
Pressures:

{1,14.503778911491,.0001450378911491,14.2233433343,14.69596432068,.01933679515879->L1
{1,.0689475729,6894.75729,.070306957829636,.0680458919319,51.71487786825->L2

What L1⁻¹→L2 gets me:

{1, .0689475485,6894.75,.0703069578,.0680458919,51.71487787

Speed:

{3.280839895013,.9113444152814,1,1.466666666667,1.687809857101,983571056.4304->L1
{.3048,1.09728,1,.6818181818182,.5924838012959,.000000001016703362164->L2

Gives: {.3048,1.09728,1,.6818181818,.5924838013,1.016703362E-9

Weight:

{.2,1,1000,28.349523125,453.59237,907184.74,1000000,6350.29318,1016406.9088->L1
{5,1,.001,.03527396194958,.002204622621849,.000001102311310924,.000001,.0001574730444178,.0000009842065276111->L2

Gives: {5,1,.001,.0352739619,.0022046226,1.102311311E-6,1E-6,1.574730444E-4,9.838579326E-7

Volume:

{1,.001,1000,3.785411784,.016387064,28.316846592,.946352946,.473176473,.0295735295625->L1
{1,1000,.001,.2641720523582,61.02374409473,.03531466672149,1.056688209433,2.113376418865,33.81402270184->L2

Gives: {1,1000,.001,.2641720524,61.02374409,.0353146667,1.056688209,2.113376419,33.8140227

These are the only ones that didn't have all the decimals I could add to it because google was cheatin me. I also did the whole L1⁻¹ bit to give the other list.

And I added UK Ton, because I'm dumb and forgot that, so that will add a few more to the conversion list

Thoughts on this, elfprince? I mean, for what the L1⁻¹ optimized to.
Looks good to me. As long as you have as many decimal places as you can in your source list, you should be all set. Those all looked good to a large number of decimal places though. If Google isn't being helpful with the conversion, I would recommend Wikipedia.

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» Goto page Previous  1, 2, 3  Next
» All times are UTC - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum