erifash Posted June 26, 2006 Share Posted June 26, 2006 This function will find any root of a given number; square, cubed, etc. Here's the code:Func _xRoot( $num, $root ) Return $num ^ ( 1 / $root ) EndFunc My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
AutoItKing Posted June 26, 2006 Share Posted June 26, 2006 Nice! And what's funny is that I signed up a year after you and I have more posts than you! http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 26, 2006 Share Posted June 26, 2006 HI, never needed that, but nice. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
RazerM Posted June 26, 2006 Share Posted June 26, 2006 (edited) It works, didn't know what it was at first. @AutoItKing I signed up 4 months after you and I have more posts than you edit: I was just showing how irrelevant that information is. Edited June 26, 2006 by RazerM My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
erifash Posted June 26, 2006 Author Share Posted June 26, 2006 Nice! And what's funny is that I signed up a year after you and I have more posts than you! That's because I think before I post. Nearly all your replies are one-liners barely relevant to the topic, solely for the purpose of increasing your post count. My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
AutoItKing Posted June 26, 2006 Share Posted June 26, 2006 I think, just not much anymore since I find that it has no point. http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
Cubehead Posted June 27, 2006 Share Posted June 27, 2006 Nice, but you could easily improve it's robustness like so : Func _xRoot( $num, $root ) If $root == 0 Then Return "Indeterminate" Else Return $num ^ ( 1 / $root ) EndIf EndFunc Link to comment Share on other sites More sharing options...
RazerM Posted June 27, 2006 Share Posted June 27, 2006 (edited) @Cubehead, it's best not to return strings if it is an error: Func _xRoot( $num, $root ) If $root = 0 Then Return SetError(1, 0, 1) Else Return $num ^ ( 1 / $root ) EndIf EndFunc edit: it it > it is Edited June 27, 2006 by RazerM My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
jvanegmond Posted June 27, 2006 Share Posted June 27, 2006 Wow someone paid a little attention during math's class. Congratulations. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now