# BaseOf

Email
 Submitted on: 7/4/2019 9:18:21 PM By: Nicholas Forystek Level: Intermediate User Rating: Unrated Compatibility: VB 6.0 Views: 2320

This is a function to get the base of any number from the exponential and power. Example BaseOf((9^5),5)=9. This escaped my memory so I thought maybe someone else too needed it posted! I was not taught exponential in this similar manor where (1/Power) makes sense of subjected to the power of where as there may be more then one result, so I'm posting it to remember it also.

code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 ``` '************************************** ' Name: BaseOf ' Description:This is a function to get the base of any number from the exponential and power. Example BaseOf((9^5),5)=9. This escaped my memory so I thought maybe someone else too needed it posted! I was not taught exponential in this similar manor where (1/Power) makes sense of subjected to the power of where as there may be more then one result, so I'm posting it to remember it also. ' By: Nicholas Forystek '************************************** Public Function BaseOf(ByVal Exponent As Double, ByVal Power As Double) As Double BaseOf= Exponent ^ (1 / Power) End Function ```

Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

7/3/2019 7:12:04 PMVB6 MVP

X ^ (1/4) does the same thing with much less code and much faster performance
(If this comment was disrespectful, please report it.)

7/4/2019 7:30:02 AMNicholas Forystek

Thanks, that's exactly what I had seen another coder do along time ago, but I forgot where, so I was trying to remember and I got side tracked doing this post! lol
(If this comment was disrespectful, please report it.)

7/4/2019 9:07:49 PMNicholas Forystek

I'm going to cheat, I'll post my original code here, and update to that.

Function Frt(ByVal X As Double)
Frt = (Sqr(Sqr(((((((((X ^ 2) / X) ^ 2) / X) ^ 2) / X) ^ 2) / X) / (4 ^ 2))) * 2)
End Function
(If this comment was disrespectful, please report it.)