Go Back   Third Generation F-Body Message Boards > Tech Boards > DIY PROM
Sign in using an external account
Register Forgot Password?

DIY PROM Do It Yourself PROM chip burning help. No PROM begging. No PROMs for sale. No commercial exchange. Not a referral service.

Welcome to ThirdGen.org!
Welcome to ThirdGen.org.

You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, at no cost, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, join the ThirdGen.org community today!


Reply
 
Thread Tools Search this Thread
Old 06-28-2007, 02:54 PM   #1
Member
 
5.7RamJet's Avatar
 
Join Date: Mar 2006
Location: Stow, OH
Posts: 211
Car: '87 Formula
Engine: Ramjet 350
Transmission: Auto
Axle/Gears: 3.23

Classifieds Rating: (2)
Send a message via AIM to 5.7RamJet
Assembly square root function

Does anyone know of or have a square root procedure (mathematical or assembly). So far I've only found long approximation methods but maybe this is really the best way of doing it? In that case how do they get so accurate with say sqrt function in high level languages (my own thought but feel free to answer if you care to).

I'm messing around trying to calculate something as practice and learning (HP and Torque due to drag) but I need to raise to power of 2.5, which can be done by square root of 5th power, but I need that sqaure root model.
__________________
Motor: RamJet, '727, $8D
350 Roller Block, Vortec 062 Heads
Comp Cams 270HR-10
Exhaust: Hooker SuperComp Headers, 3" Hooker Catback
Drivetrain: 700R4, 3.23 posi, disc brakes
5.7RamJet is offline vBGarage Page   Reply With Quote
Old 06-28-2007, 03:08 PM   #2
Moderator
 
Apeiron's Avatar
 
Join Date: Jan 2000
Location: Rio Oro de Santa Ana, San Jose, Costa Rica
Posts: 19,805
Car: 1984 Z28 Hardtop / 1988 IROC T-top
Engine: 383 Carb / 305 TPI
Transmission: 4L60 / T-5
Axle/Gears: 3.54 Dana 44 / 3.08 10 bolt

Classifieds Rating: (0)
Re: Assembly square root function

All methods of calculating irrational roots are approximate, but can be improved through iteration to any precision desired.

Do you want an implementation in floating point? fixed point? integer? what format?

What's the equation you're trying to use?
Apeiron is online now vBGarage Page   Reply With Quote
Old 06-28-2007, 03:59 PM   #3
Member
 
5.7RamJet's Avatar
 
Join Date: Mar 2006
Location: Stow, OH
Posts: 211
Car: '87 Formula
Engine: Ramjet 350
Transmission: Auto
Axle/Gears: 3.23

Classifieds Rating: (2)
Send a message via AIM to 5.7RamJet
Re: Assembly square root function

Rolling Resistance, cell C13.
Attached Files
File Type: zip HP.zip (2.4 KB, 25 views)
5.7RamJet is offline vBGarage Page   Reply With Quote
Old 06-28-2007, 05:06 PM   #4
Moderator
 
Apeiron's Avatar
 
Join Date: Jan 2000
Location: Rio Oro de Santa Ana, San Jose, Costa Rica
Posts: 19,805
Car: 1984 Z28 Hardtop / 1988 IROC T-top
Engine: 383 Carb / 305 TPI
Transmission: 4L60 / T-5
Axle/Gears: 3.54 Dana 44 / 3.08 10 bolt

Classifieds Rating: (0)
Re: Assembly square root function

Do you want floating, fixed or integer?
Apeiron is online now vBGarage Page   Reply With Quote
Old 06-28-2007, 06:01 PM   #5
Moderator
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 11,390
Car: check
Engine: check
Transmission: check

Classifieds Rating: (1)
Re: Assembly square root function

Apeiron, glad to see that you have this one. My level of math doesn't mesh that well with assembler.

Another thought would be to use a lookup table.

RBob.
RBob is offline vBGarage Page   Reply With Quote
Old 06-28-2007, 06:38 PM   #6
Moderator
 
Apeiron's Avatar
 
Join Date: Jan 2000
Location: Rio Oro de Santa Ana, San Jose, Costa Rica
Posts: 19,805
Car: 1984 Z28 Hardtop / 1988 IROC T-top
Engine: 383 Carb / 305 TPI
Transmission: 4L60 / T-5
Axle/Gears: 3.54 Dana 44 / 3.08 10 bolt

Classifieds Rating: (0)
Re: Assembly square root function

I'd also use a lookup table, since speed is the only variable that needs a fractional root.

There are a number of interesting algorithms for calculating square roots to any desired precision though, depending on which format you're using. All of them are slow.

Last edited by Apeiron; 06-28-2007 at 06:47 PM.
Apeiron is online now vBGarage Page   Reply With Quote
Old 06-29-2007, 02:34 AM   #7
Member
 
5.7RamJet's Avatar
 
Join Date: Mar 2006
Location: Stow, OH
Posts: 211
Car: '87 Formula
Engine: Ramjet 350
Transmission: Auto
Axle/Gears: 3.23

Classifieds Rating: (2)
Send a message via AIM to 5.7RamJet
Re: Assembly square root function

Thanks guys, didn't think of the lookup table, thats a good idea. I'll give it a go.

I didn't think about implementing the equation until I was actually writing the code. I think I got too far ahead of myself. BTW, I'm doing it the hard way...with a hex editor, since I don't have a source with the wideband patch, let alone all my values transferred. I guess it's not really that much harder, just have to watch the addressing. Good learning though

Thanks again.
5.7RamJet is offline vBGarage Page   Reply With Quote
Old 06-29-2007, 02:34 AM
ThirdGen
1992 Camaro




Paid Advertisement


Reply

Go Back   Third Generation F-Body Message Boards > Tech Boards > DIY PROM

Tags
5th, algorithm, algorithmassembly, asembely, assembler, assembly, calculate, cars, functions, power, root, roots, square, squared, squareroot
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

 


1982 Camaro '82 || 1983 Camaro '83 || 1984 Camaro '84 || 1985 Camaro '85 || 1986 Camaro '86 || 1987 Camaro '87 || 1988 Camaro '88 || 1989 Camaro '89 || 1990 Camaro '90 || 1991 Camaro '91 || 1992 Camaro '92


All times are GMT -5. The time now is 06:29 PM.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
All content copyright © 1997 - 2012 ThirdGen.org. All rights reserved. No part of this website may be reproduced without the expressed, documented, and written consent of ThirdGen.org's Administrators.

Emails & Contact Details