Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Home | Comments:
$solve v2.5 by MoNoXiDe
Description:
Snippet to solve equations

Submitted Review Author's Updates

There is no review for this file yet.
Update History
v2.5 - Major redo of parser. Much more flexibility in input of equation.

v2.0.1 - fixed a major bug that disabled the multiple solution feature that came with v2.0.

v2.0 - Addded new functions [a]sin,cos,tan,log,sqrt
Greatly improved the equation transformer on input that was necessary for extra functions
Screenshot:

Comments:

  Mode:    Create New Post

denialMar 9, 2006 6:04PM
Ok, I updated your script because of your v2.0.1. After that, it wont give me any solution even for the most simple calculations. eg //echo -a $solve(x+x = 4)
* /echo: insufficient parameters

Text edited by author on Mar 9, 2006 @ 6:05PM


MoNoXiDeMar 10, 2006 12:46PM
erm sorry, I updated the wrong version.

I'll reupdate right now.

If you want it now then the correct version is available here:

http://www.mirc.net/projects.php?go=1140373062&get_desc=1

Thanks for pointing that out. :)

impuLseMar 2, 2006 2:46PM
LOOOOOOOOOOOOOOOOOOOL you are f***in ace dude!! :P
didnt test it but wanted to do something like this before... *testing*

MoNoXiDeMar 4, 2006 4:28PM
Thankyou :)

Hope it works well for you.

^Vampire^Feb 23, 2006 11:13AM
Trigo functions are supported in mIRC - you have tan, atan, cos, etc.. :s

MoNoXiDeFeb 23, 2006 12:44PM
yeah but not in $calc, anyway I've solved that problem in combination with the regex below. :)

AmidosFeb 22, 2006 5:38AM
nice.

MoNoXiDeFeb 22, 2006 3:32PM
Thankyou.

I need some help with a bit of regex I plan to add to this. I'm not really familiar with REs and any help would be greatly appreciated.

I wish to achieve the following:

1) I want to replace any )( with )*( but have been unable to succeed.

2) In any expression I wish to replace any x with a number behind it with a *x and leave any x's without a number behind it alone. For this I have $regsubex($1,/\dx/g,$remove(\t,x) $+ *x) but for some reason it seems to remove the number all together.

Any ideas?

Thanks

mygganFeb 22, 2006 4:42PM

%string = 2x(4x+x)=8x-2(x+5)(x-5)
%string = $regsubex(%string,/(\x29|\d)\x28/g,\t* $+ $chr(40))
%string = $regsubex(%string,/(\d)x/g,\t*x)
!echo -ag %string

quote:
echo said:

2*x(4*x+x)=8*x-2*(x+5)*(x-5)
EDIT: Fixed

Text edited by author on Feb 22, 2006 @ 6:50PM


MoNoXiDeFeb 22, 2006 5:02PM
Thanks a lot

The first one is simple enough, i'm not quite sure why I didn't think of it before hand

and as for the second one it half works:

consider the string x+3=2x-2+x-4x

your $regsub 'returns' x+3=2*x-2+x-2*x

Edit: I forgot to mention on the first point I don't just want )( to be replaced with a * but i want <num>( to be replaced with <num>*(

sorry about that

EDIT:Thanks! Thats all I wanted :)

^ well I thought it was. I have another problem. I need to replace any number with a letter infront of it to be <num> * <letter>. Not just x, thanks.

EDIT: It's ok i've managed to do it

Text edited by author on Feb 23, 2006 @ 3:16PM




Create New Post

You must be logged in to post messages.