Sign in to follow this  
Followers 0
VicTT

<This is a string of interesting text>

18 posts in this topic




One thing... dont mean to be mean, but if it is so lame then why are you asking again.

I just tried your example in C++, and it didnt work. The formula seems right, but apparently I am missing something.

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int x;
    int n;
    float a;
    
    cout << "Please select a number for rooting: ";
    cin >> x;
    
    cout << "Please select a root (sqrt = 2, cube rt = 3): ";
    cin >> n;
    
    a = x^(1/n);
    
    cout << "Output: " << a << "\n";
    system("PAUSE");
    return EXIT_SUCCESS;
}

Also, as the other guy said. The developers are busy so the majority of hits you got were people that know absolutely nothing, and/or very little about the actual inter workings of AutoIt. Please be a little patient. These guys have real lives they live outside of AutoIt, and yet they still get enough time to make this one of the best supported open source project out there.

I wish I could help you more, but I dont have the Sqrt() code. I cannot check to see exactly how they are doing it.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Ok..I don't mean to be mean either..but..

1. Did you check the date on that thread?It's about 2-3 weeks ago..the autoit devs seem to be having great lives..

2. Only thing that's lame is that I had 82 hits and no replies, the subject isn't lame..

And 3..lol man, you didn't understand one word I was saying, did u?

Ok..so..from the top..I don't know much about C++, but I sure as hell know that "^" is "XOR" and NOT "to the power of"..Secondly, that's NOTHING like what needed testing..GOD!I wanted to give the devs a faster function for Sqrt(x)=x^(1/2)..(^ is PSEUDOCODE for to the power of..in C++, you would write pow(x,1/2))..

And the function is in PASCAL, easily translatable into C++..IT HAS NOTHING TO DO WHATSOEVER WITH WHAT YOU WROTE..THAT'S WHAT ROOT OF POWER N MEANS..RAISING X TO THE POWER OF 1/N..BUT THAT'S NOT THE POINT..IT WAS ALL ABOUT SQRT..I WAS WONDERING WHAT EXECUTES FASTER..X^(1/2) OR THE FUNCTION I GAVE THERE..I'm not gonna be mean..I've screamed alot..just so I don't start insulting you or anything..but man..you didn't get too much from that post, did u?Either u read it in a hurry or I dunno..


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You got one pertinent reply from somebody who at least tried to do what you asked and how do you treat him? You go off on him like he's some sort of idiot. Bravo.

Edited by Valik

Share this post


Link to post
Share on other sites

Hey Valik..I'd appreciate it if you wouldn't go vigilante on me just because we kind of disagreed on every subject possible till now..that's not a pertinent reply..a pertinent reply wouldn't have something that doesn't help me..hey..since we're talking about pertinent replies..you should come up with one too instead of lecturing me on how to treat people that don't understand one word I'm saying..yea they try..hey Valik..can we *try* and be friends?Like the kind of friends that don't tell each other what classes are and are not, or how to treat people that obviously don't have the vaguest idea about C++, algorithmic programming and other things that don't matter since we need to be kind to everyone..just like you've been kind to me every single time, Valik..


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

VicTT, you got a response from someone.. Does that make you feel good? Sure it does, that's why you created this post.. correct? For attention?

Share this post


Link to post
Share on other sites

Like the kind of friends that don't tell each other what classes are and are not, or how to treat people that obviously don't have the vaguest idea about C++, algorithmic programming and other things that don't matter since we need to be kind to everyone..just like you've been kind to me every single time, Valik..

I'll make a deal with you. If you don't ever post on the forum again, I won't point out that you don't know much of anything about the subjects you bring up.

Share this post


Link to post
Share on other sites

I'll make a deal with you.  If you don't ever post on the forum again, I won't point out that you don't know much of anything about the subjects you bring up.

<{POST_SNAPBACK}>

lmao :">

FootbaG

Share this post


Link to post
Share on other sites

@VicTT

Well... You have accused me of things that are untrue first off, and secondly that you do yourself.

Ok..so..from the top..I don't know much about C++, but I sure as hell know that "^" is "XOR" and NOT "to the power of"

AND

Either u read it in a hurry or I dunno..

Now to show where I said something you must have missed.

I just tried your example in C++, and it didnt work. The formula seems right, but apparently I am missing something.

Did you not notice I said I am missing something? I am not a full fledge developer. I am working on it. I am learning C++ in my spare time... I have never once claimed to know everything let alone anything at all. I was trying to help, and like Valik clearly put it you tried to flame me. Thanks.

I read and understood everything you said. I know you were trying to find a faster function for the Dev's, and just because YOU think the Dev's have pretty good lives doesnt mean it is fact. Just because they post and respond to some threads mean they have time for yours. I mean common some of them could well have read your bickers with Valik and just dissmissed everything you have ever tried to say. I know from this post on if you dont cool down and get your head out of your arse I will be ignoring you. I doubt the dev's would do that, but you never know we are all human.

I dont feel like quoting all of your mistakes like I have above, but another quick one is the fact you said you could give an example in C++, and or AutoIt code. You yourself have already admitted to not knowing C++, and even proved it by not knowing what the 'to the power of' character is. I am sure you might be able to figure it out, but if it was that easy you could have just done it and submitted it straight to a developer instead of trying to cause some drama.

If you dont like the response time the developers have then tough there is such a thing as patience.

Geeze...

"How smart does one have to be to use his own brain?"

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

http://www.autoitscript.com/forum/index.php?showtopic=13382

Someone proposed I should bump this thread..82 views and no reply?That's kind of lame..

<{POST_SNAPBACK}>

I believe that person was me? You could of at least taken my advice and bumped the original thread, but no, you had to make a second thread in which I gave you a proposed method of getting some traffic to your topic, and now this, the third thread over the same topic, not only that but you also named it with a useless title and description.

FYI: "^" is commonly used to in computer langauges for exponentiation, not to say that "^" isn't used in the defination of XOR, ie. A ∨ B = (A ∧ !:) ∨ (!A ∧ B ).

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Bit of research...

AutoIt is using the native sqrt() function of C++.

Now whether or not it is faster to use that or the actual function as I have fixed using the pow() instead of the "^". Now it is up to you to test speed. I have no means possible to do this, nor the time to provide a solution for the likes of you.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

@Burrup

Sorry Burrup..I didn't really see which thread I bumped..It's all just numbers to me

^ is not used in the definition xor, BUT since JSThePatriot decided to run the example in C++, I thought he knows enough about it so that he does not use ^ - as you had said already, commonly used for exponentiation since C++ interprets it as being XOR..P.S. I know what XOR is, but thanks for reminding the others here :)

@JSThePatriot

I dont feel like quoting all of your mistakes like I have above, but another quick one is the fact you said you could give an example in C++, and or AutoIt code. You yourself have already admitted to not knowing C++, and even proved it by not knowing what the 'to the power of' character is. I am sure you might be able to figure it out, but if it was that easy you could have just done it and submitted it straight to a developer instead of trying to cause some drama.

I would have submitted it to the devs, if it would have been my second, third or so on 'th submission..but it's my first, and I don't know who to send it to..secondly..

(^ is PSEUDOCODE for to the power of..in C++, you would write pow(x,1/2))

And with this I've proven I know what ^ means..

I never meant to make a drama out of this..I never meant to flame you..but WHERE EXACTLY in that post have you proven to me you knew what I was talking about all along?

I *CAN* give an example in C++ OR AutoIt code, but as I mentioned earlier, I don't know what optimizations can be made in AutoIt so that's exactly why I didn't make one..

Edited by VicTT

[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

After going back and fixing my code. Here is what you were wanting kind of... I was just writing it up in C++ and going to compare it to the way the dev's do it.

#include <cstdlib>
#include <iostream>
#include <cmath>

using namespace std;

int main(int argc, char *argv[])
{
    int x;
    int n;
    float a;
    
    cout << "Please select a number for rooting: ";
    cin >> x;
    
    cout << "Please select a root (sqrt = 2, cube rt = 3): ";
    cin >> n;
    
    a = pow((float)x,(1/(float)n));
    
    cout << "Output: " << a << "\n";
    system("PAUSE");
    return EXIT_SUCCESS;
}

That is more advanced than what they use, as well as it allows decimals, which I know arent allowed when 'rooting'. They just use the SQRT() function of C++.

If you didnt mean to cause drama and flame then no problemo. I was just trying to help the situation. I am not a C++ guru. I am trying but going slow at this.

I hope I have been some what of a help with the above information of what the dev's use.. I cant test for speed, but you atleast know they didnt re-write the SQRT() function.

I know you were wanting to know about 2 things...

1. What do the dev's use?

2. Which way would be faster the way they have it or the other way you explained?

I have answered 1, and I dont have the means or know how to test 2. I am sure if I spent some time on it I could figure it out, but it is a simple math function either way it is done, so I dont think there would be alot of loss in speed either way it was done.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

A ∨ B = (A ∧ !B) ∨ (!A ∧ B )
I provided that so that you know the general definition of XOR, not a specific equation directed at any one langauge, eg. C++, like JS provided.


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

A ∨ B = (A ∧ !B) ∨ (!A ∧ B )
Totally off-topic but the way I'm learning it at uni, in logic represents inclusive OR while (note the underlying bar) represents exclusive OR.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

A B = (A ∧ !:) ∨ (!A ∧ B ), made typo.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Just so you know, Burrup..Instead of whatever symbols you wanted XOR, OR, AND to be, I can only see squares(unprintable characters)..


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Interesting, but can't help you :), sorry.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0