Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -




Not registered yet?

Post a reply

Go back

Write your message and submit
:) :| :( :D :o ;) :/ :P :lol: :mad: :rolleyes: :cool: | :dizzy :eek :kiss :roflol :rolleyes :shame :down :up :touched :sleep :wave :swear :tongue :what :faint :dunno

Go back

Topic review (newest first)

2005-09-09 06:34:37

thanks!!! - btw, if possible,  the point is how can i get to know how can i convert these formulas into algorithms - the standard deviation i knew how to do it, but stuff like calculation integrals and all of these stuff i really don't know - my math notation knowledge got stuck in the middle of highschool, and i choosed fine-arts university, so, during a long time i don't know what is math notation, and that time i had no interest about math notation as i have now (i never thaught those would be helpful for me for picture processing)
Is any open documentation (like from dspace, wikipedia or whatever, or even bibliography) could help me on this task?  or even anyone(s) from this forum can explain how each situation is used in a code notation?
really thanks, for me and all people knows the importance of this help...

2005-09-07 10:38:09

all the expressions in the image can be implemented into any computer laguage

most of the formulas seem to be related with sets and matrices so they are very easy to manipulate with a computer.

2005-09-07 07:50:57

Math notation is all about concepts. There may or may not be an algorithm, or there could be lots of algorithms!

Being able to turn a concept (expressed in math notation) into a workable algorithm can be an interesting and challenging task! (It is like when a Scientist discovers something, then the Engineer takes over to make it workable)

And, because it is something practical you want to do, you don't have to do everything 100% accurately - speed will be important.

An example is this thread here where a method for calculating cosine is discused - it is only necessary to calculate the first few terms to get a good result.

(BTW, I can see that No 13 is a matrix multiplication, and there are algorithms (and programs) to do that.)

2005-09-07 07:17:47

Here is an example from formulas i got from an ieee paper about using fractals for compressing pictures
Ieee papers normally talk about algorithms, but only formulas like this are shown - for me who are not comfrotable with math notation is very complicated to try to understand it:

are all simple to translate to code notation?

2005-08-30 07:26:30

That sounds correct, according to my memory of C.

".net" has lots of stuff built in

Javascript has the Math object

Most languages have some math built in, but to do more complicated stuff you gotta get in to some programming.

John E. Franklin
2005-08-29 23:38:55

In C, you can declare variable of various lengths, signed and unsigned numbers.
Some I remember are:  int or integer, long, float, and double.
In C, the complicated math routines are probably in libraries that must be included with a statement like:
#include "C:\BorlandC\stdmath.c"
(I made that last line up.)
I also read that you shouldn't really hard-code paths like above, so better would be:
#include <stdmath.c>
if you can get it to work.  I don't know how to configure the path that way.
Good Luck...

2005-08-29 01:34:58

thanks! :-)

2005-08-25 14:26:39

Wow. It's been a really long time since I did any C programming, and I don't remember what Math functions are available. So, I'll give a couple simple examples in Java, which has similar syntax.

The Quadratic Formula:

public Point quadform (a, b, c)  {
       float plus, minus;

       plus = (b^2 + Math.sqrt (2*b - 4*a*c)) / (2*a);
       minus = (b^2 - Math.sqrt (2*b - 4*a*c)) / (2*a);

       return new Point (plus, minus);


public double factorial (n)  {
       double answer = 2;

       if (n > 1)  { answer = factorial (n-1); }
       return answer * (n-1);

This may sound really stupidly obvious, but writing algorithms of math functions is just programming. Get a book and practice. If you're having a problem with a specific function, post a specific question and we'll be happy to answer.

2005-08-14 05:38:22

an example: standard deviation formula converted to algorithm

the formula is:
D=sqrt{sum from{i=1}to{N}(x_{i}-bar x)^{2}over{N-1}}

the algorithm in sdlBasic ( is


'- standard deviation
   dim x[n]
while 0=0
prints("Standard Deviation"):prints("")
prints("OpenOffice formula format:")
prints("D=sqrt{sum from{i=1}to{N}(x_{i}-bar x)^{2}over{N-1}}"):prints("")
prints("getting random values..."):prints("")
for i=1 to n
close #1
prints("running the formula..."):prints("")
for i=1 to n
for i=1 to n
prints("standard deviation: "+str$(d)):prints("")

my main interest is being able to convert formulas like from here: to algorithm

2005-07-28 20:54:43

I don't use OpenOffice (though it sounds good!), so could you give some examples?

2005-07-28 19:27:52

how can i write as code notation (like on programming languages like ansi-basic, C, pascal, etc.) all the math notations we can get from OpenOffice's Math editor?      these can be functions or algoritms

Board footer

Powered by FluxBB