NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Question for php pros

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-25-2005, 12:02 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Apr 2003
Posts: 78
DomMike is an unknown quantity at this point
 



Question Question for php pros


Hi,
I was wondering if any of you pros could help me, translate this function so I can use it in a php script.
Thanks
=========
To calculate it, you would first calculate 1 + J then take that to the -N (minus N) power, subtract that from the number 1. Now take the inverse of that (if you have a 1/X button on your calculator push that). Then multiply the result times J and then times P.

The one-liner for a program would be (adjust for your favorite language):

M = P * ( J / (1 - (1 + J) ** -N))
__________________
Mike
DomMike is offline  
Old 02-25-2005, 01:04 PM   #2 (permalink)
Account Closed
 
axilant's Avatar
Join Date: May 2004
Location: /etc/passwd
Posts: 2,178
axilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to behold
 

Member of the Month
July 2005

Quote:
M = P * ( J / (1 - (1 + J) ** -N))
PHP Code:
$m $p*($j/(1-(1+$j)**-$n)); 
????: NamePros.com http://www.namepros.com/programming/72040-question-for-php-pros.html
i think thats what u need?

i didnt try this... but i think its what u want. http://php.net/ and look at there math functions im sure you can figure it out....
axilant is offline  
Old 02-26-2005, 06:37 AM   #3 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Originally Posted by axilant
PHP Code:
$m $p*($j/(1-(1+$j)**-$n)); 
i think thats what u need?

i didnt try this... but i think its what u want. http://php.net/ and look at there math functions im sure you can figure it out....
all you have done is put a $ before the letters. somehow i do not think doing that will suddenly solve his problem.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 02-26-2005, 07:25 AM   #4 (permalink)
NamePros Member
Join Date: Nov 2003
Location: Ontario, Canada
Posts: 127
eagle12 will become famous soon enougheagle12 will become famous soon enough
 



This is from the function you showed:

PHP Code:
$M $P*($J/(1-(pow((1+$J), (-1*$N))))) 
This is from the word description:

PHP Code:
$M $P*($J*(1/(1-(pow((1+$J), (-1*$N)))))) 
????: NamePros.com http://www.namepros.com/showthread.php?t=72040
There is a slight difference between the two, because you say J * the inverse of (1-((1+J)^-N)). But the function you put at the bottom just says J / (1-((1+J)^-N)).

Let me know if this helps.
Last edited by eagle12; 02-26-2005 at 07:30 AM.
eagle12 is offline  
Old 02-26-2005, 03:32 PM   #5 (permalink)
Senior Member
 
majinbuu1023's Avatar
Join Date: Jan 2005
Location: New Zealand
Posts: 3,747
majinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to behold
 



ok im no php pro but it looks like one of you guys solved it lol
majinbuu1023 is offline  
Old 02-26-2005, 08:38 PM THREAD STARTER               #6 (permalink)
NamePros Member
Join Date: Apr 2003
Posts: 78
DomMike is an unknown quantity at this point
 



Thanks a lot eagle12.
I'll try and let you know.
Mike
__________________
Mike
DomMike is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:46 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger