Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Sub: Help needed!!!

Dear all,
I have difficulty in writing a macro for the following situation and
need help urgently on this. I would greatly appreciate any kind soul
outthere who is willing to help me out. :)

I have 2 funtions:

f = 1 + (1.4) * 2 / .005 * r
g = (1 / (1 - (1 / .005 * r))) ^ 2

I need to write a macro to incrementally calculate and display to 6
decimals, the first positive value of r such that f-g< precision where
precision will be a variable for the user to input.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Help needed!!!

Are you sure you specified the problem correctly? I
get the following values:

r f g f-g
0.000001 1.00056 1.00040012 0.00015988
0.00001 1.0056 1.004012032 0.001587968
0.00005 1.028 1.020304051 0.007695949
0.0001 1.056 1.04123282 0.01476718
0.0005 1.28 1.234567901 0.045432099
0.001 1.56 1.5625 -0.0025
0.003 2.68 6.25 -3.57
0.005 3.8 #DIV/0! #DIV/0!
0.007 4.92 6.25 -1.33
0.009 6.04 1.5625 4.4775
0.01 6.6 1 5.6
0.1 57 0.002770083 56.99722992
0.5 281 0.00010203 280.999898

If these are correct, f - g is not well behaved around
zero. 'r' could be about .000001 or in (.007, .009).

HTH,
Merjet


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Rows With Non-Needed Data between Needed Data Daren Excel Worksheet Functions 2 September 30th 08 06:47 PM
More help needed :-( ChrisMattock Excel Worksheet Functions 5 June 28th 06 01:03 PM
Help Needed Eric Excel Discussion (Misc queries) 1 June 23rd 06 03:16 AM
help needed [email protected] Excel Discussion (Misc queries) 0 March 20th 06 07:01 PM
Help needed! DBsWifeLB Excel Worksheet Functions 3 March 14th 06 08:23 PM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"