math programming

???Roun512 [roun512]
11 years ago

0

hello all ,

can anyone give me a link or something to learn math programming online

thanks all

20replies
11voices
278views
???Roun512 [roun512]
11 years ago

0

if someone didnt understand me just write and i will tell him what i mean :)

EEEEE
11 years ago

0

then what do u mean ???

EEEEE
11 years ago

0

maybe u should download a book ???

???Roun512 [roun512]
11 years ago

0

lol i mean online like http://www.w3schools.com/

EEEEE
11 years ago

0

humm i dont have any idea


0

hey @roun512 , when u will find idea about maths programming , please text me about !!! good luck

Ahed91
11 years ago

0

math programming …..
Matlab .. The Language of Technical Computing
I ….
if you can be more specific about math programming and explain your needs ….
so

???Roun512 [roun512]
11 years ago

0

well i mean if i got something like this
var foo = 5 + 6 * 7 var bar = foo % 8 var moo = bar * 2 var rar = moo / 3 function check(x) { if (x.length == moo) { alert("win!"); window.location += "?lvl_password="+x; } else { alert("fail D:"); } }
how can i do math to know what is the pass
and iam not saying give me the pass but i want to know how do i do it

Genesis [Fromwarriors]
11 years ago

0

Python:

#Simple calculator  
def calc():  
 number1 = input("Enter your first number> ")  
    print(number1)  
  number2 = input("enter your second number> ")  
   print(number2)  
  op = raw_input("Enter an operator(+, -, /, *)> ")  

    if(op == "+"):  
      print(number1 + number2)  
    if(op == "-"):  
      print(number1 - number2)  
    if(op == "*"):  
      print(number1 * number2)  
    if(op == "/"):  
      print(number1 / number2)  
calc()  

enjoy.

Dollce159
11 years ago

0

what ever!!!! huhuhuhuhhuuhuhuhuhuhuhuhuhuhuhh,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Theugk
11 years ago

0

Math Programing do u mean maple, mathlab or somthin like this ??

Pawda [Memoria]
11 years ago

0

@roun512 Debuggers like gdb or the one presents in visual studio and even firebug are here for that. Compute in your head or an a piece of paper might be funny at starts but in the end it does nothing more a debugger can’t already do for you and much more faster.
I suggest you to learn on how to use them and primary learn how to put breakpoints and how to read your var in live, you might have a revelation haha.
Your example is easy to solve by head but when you will have to face code like real level 3 and you want actually reverse it (for fun I guess), a debugger will definitely save your ass.

@Fromwarriors Exept the fact you missed the % operator, “That” is an ugly code like I don’t like to see one and I suggest you to have a look on function pointer or at least learn more keyword than the “if” statements, this code make too much jump for nothing. It’s not because computers are more and more strong that we shouldn’t care anymore on our code.

oxide
11 years ago

0

i think he wants to learn how to use logarithmic and computer science math for algorithims
if i am right roun get at me ill show u a little of what i know try to use set theory etc read about it or do you want statistical math?

???Roun512 [roun512]
11 years ago

0

Hi , This Is old Thread ( Topic ) But Now I Know How TO Do All Of This :) But Thanks .

Gninja
11 years ago

0

learn math programming? rather a large topic good luck

Honey Boo Boo [Ski900]
11 years ago | edited 11 years ago

0

You should Google Search/Sorting algorithms. I would also make sure you are completely comfortable with how exponents and logarithms work. Here is some code I wrote in C# (Console App) while practicing for my programming mid term. One thing that helps me out when trying to figure out an algorithm is writing it down on paper first. Also, start out at the level of math you have completed. No sense in trying to code infinite geometric series or integrals when you are in high school algebra.

The first one calculates Pi. The amount of decimal places over depends on the number of iterations. You could try doing something similar with another irrational number, such as Phi.
```
public void Pi()
{
double pi = 4.0;

        for (int i = 1; i <= 2730000; i += 4)//273000 � 3.14159  
        {  
            pi = pi - (4.0 / (i + 2.0)) + (4.0 / (i + 4.0));  
            Console.WriteLine("{0,4}", pi);  
        }  
    }  

The second one is to determine if a number is prime (only divisible by one and itself), or composite.  

public void Prime()
{
//prime if its greater than 1 and divisible only by 1 and itself
int prime;
bool np = false;

        Console.WriteLine("Enter a number to determine if it is prime: ");  
        prime = Convert.ToInt32(Console.ReadLine());  


        for (int i = 2; i <= (prime - 1); i++)   
        {  
            if (prime % i == 0)  
            {  
                np = true;  
                break;  
            }                
        }  

        if (np == true)  
        {  
             Console.WriteLine("{0} is a composite number", prime);  
        }  
        else  
        {  
            Console.WriteLine("{0} is a prime number", prime);  
        }  
    }  

```

Pawda [Memoria]
11 years ago | edited 11 years ago

0

Quite old topic brings back again hehe.
Just some remark on this:
1) First remark is, none of this short snippet has return and they actually print their results. That’s good for testing but don’t forget to adapt in real test application.
2) Still in real case environment, you might prefer use the constant System.Math.PI instead of getting one by computation.
3) Same as 2) on isprime, you might prefer more efficient algorithm: http://en.wikipedia.org/wiki/Sieve_of_Atkin //
http://en.wikibooks.org/wiki/Efficient_Prime_Number_Generating_Algorithms

Honey Boo Boo [Ski900]
11 years ago

0

I don’t disagree with anything you are saying, there are definitely faster and more efficient ways of doing things. However, I believe it is extremely helpful to know the derivation of the problem. I would never use type out my Pi example in a program, but actually solving it has helped me immensely with logic and visualization of an algorithm (which is probably why our teacher likes give us problems like this: ) ). I sort of equate it to calculus and it’s proving of theorems used in algebra/trig.

Great response though, some good points brought up Memoria!

Pawda [Memoria]
11 years ago

0

That’s why I’ve mentioned “in real case environment” ^^.
You only learn the essence of programming by practicing more and more, there is no “shit” tests, they have to be done.

Honey Boo Boo [Ski900]
11 years ago

0

Ahhh! I misunderstood that part. My apologies!

Discussion thread has been locked. You can no longer add new posts.
1 of 21

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss