Forum · Gallery · Shop · Sponsors
Home · FAQ · New Posts · Private Messages · Search · Members · Members Map · Calendar · Groups · Profile · Donate · Log In

Announcement: Important message regarding Site Behaviour and Terms of Use. Click here to read.

DISCO3.CO.UK > Off Topic - Everything Else

VBA experts? Binary chop VBA code for excel
Post Reply Down to end
Page 1 of 1
NoDo$h
 


Joined: 02 May 2006
Location: wear the fox hat?
Posts: 6532

United Kingdom 2008 Discovery 3 TDV6 SE Auto Zermatt Silver
VBA experts? Binary chop VBA code for excel

Excel's =XIRR is all very well, but it uses an iterative methodology to ascertain the "best fit" answer. I need to carry out a similar calculation, but using the bisection method (binary chop) to provide a test model for a piece of software that's being implemented by my client. None of the standard excel anaylsis toolkit use the binary chop, so the model I've put togther is only a close fit (within 0.03%) when I need to be closer to 6 decimal places with the accuracy.

The software partner is being suitably cagey and will only offers us fragments of their code and my VBA knowledge (to build a calc engine in excel for testing) is..... nil.

Anyone out there had a read of this and now nodding sagely as opposed to wondering what the hell I'm drinking tonight? All suggestions welcome.
 Carbon footprint? I neither know nor give a damn

DISCLAIMER: If you find a posting or message from me offensive, inappropriate, or disruptive, please ignore it. If you don't know how to ignore a posting, complain to me and I will be only too happy to demonstrate. 
 
Post #356115Mon Oct 06 2008 8:45pm
View user's profile Send private message View poster's gallery Reply with quote
DG
Site Moderator 


Joined: 12 Dec 2005
Location: In the pubic domain !
Posts: 15105

United Kingdom 2006 Discovery 3 TDV6 S Auto Zambezi Silver

f(x) = x^3 + .25x^4
g(x) = x + 2x*cos(x^2)

x^3 + .25x^4 = x + 2x*cos(x^2)

x=0
-6*cos(x^2)+x^3+4*x^2-4=0

Insert that into a speadsheet and name a cell x

Now you use GoalSeek from the tools menu
and let that set the cell with the formula to zero by changing the cell named x

Thumbs Up








Well ...it sounds plausible to me Whistle Wink
 Powered by TorqTune

In three words I can sum up everything I've learned about life: .................It goes on. 


Last edited by DG on Mon Oct 06 2008 9:06pm; edited 1 time in total 
Post #356120Mon Oct 06 2008 8:55pm
View user's profile Send private message View poster's gallery Reply with quote
JMC
 


Joined: 25 Feb 2006
Location: Aberdeen-Angus. Where the Bull* comes from!
Posts: 4162

Scotland 2006 Discovery 3 TDV6 SE Auto Cairns Blue

Don't know if you've been drinking but it reads like you need a good whisky and some fuzzy logic Wink
 The older I get, the more I realise that people confuse wrinkles for wisdom Smile
 
 
Post #356121Mon Oct 06 2008 8:55pm
View user's profile Send private message View poster's gallery Send e-mail Reply with quote
NoDo$h
 


Joined: 02 May 2006
Location: wear the fox hat?
Posts: 6532

United Kingdom 2008 Discovery 3 TDV6 SE Auto Zermatt Silver

er, thanks and thanks Confused

If I put that lot in tomorrow and end up with porn..... I know where you live DG! Laughing
 Carbon footprint? I neither know nor give a damn

DISCLAIMER: If you find a posting or message from me offensive, inappropriate, or disruptive, please ignore it. If you don't know how to ignore a posting, complain to me and I will be only too happy to demonstrate. 
 
Post #356127Mon Oct 06 2008 9:05pm
View user's profile Send private message View poster's gallery Reply with quote
SN
 


Joined: 03 Jan 2006
Location: Doing the Lambeth Walk
Posts: 7518

England 2006 Discovery 3 TDV6 S Auto Buckingham Blue

Too hard for half eleven on a monday night - i've written (super efficient) binary chop code in VB5/6 in the (now dimming) past but searching my personal archive (old 40Gb USB Drive) hasn't revealed anything useful... unless you want some massive tranches of "3D universe" manipulating code ... sorry

Can't believe I managed to write all that really complicated stuff many years ago Shocked
 Steve N | 2006 TDV6 S Auto in Buckingham Blue | Member of the top ten club | Am I online?
 
 
Post #356207Mon Oct 06 2008 10:31pm
View user's profile Send private message View poster's gallery Send e-mail Reply with quote
Display posts from previous:  
Post Reply Back to top
Page 1 of 1
Jump to:  
Previous Topic | Next Topic >


Posting Rules
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



Powered by phpBB © 2001 phpBB Group. SEO by phpBB SEO
Copyright © 2004-2008 Martin Lewis
DISCO3.CO.UK RSS Feed - All Forums