• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

Creating Your Own Math Tools

steve_bank

Diabetic retinopathy and poor eyesight. Typos ...
Joined
Nov 9, 2017
Messages
13,817
Location
seattle
Basic Beliefs
secular-skeptic
https://www.ibm.com/developerworks/aix/tutorials/au-lexyacc/index.html

yacc and lex are tools you can use to create your own math language.

GNU packages should be available. The link has a shorrt tutorial/

You can

create a language with math expressions and logical expressions
create a lexical analyzer that parses the expressions
compile it

Have fun. Beats video games.
 
Steve, I know you have bad eyesight, so I don't know if you'd enjoy it too much, but I played around with a GLSL sandbox called Fragmentarium to create 3d fractals and other stuff. You can compile the latest versions.... if some of the guys are still working on it.
 
Steve, I know you have bad eyesight, so I don't know if you'd enjoy it too much, but I played around with a GLSL sandbox called Fragmentarium to create 3d fractals and other stuff. You can compile the latest versions.... if some of the guys are still working on it.

I appreciate the thought. Reading a book cover to cover right now is a chalenge, even a PDF magnified.
 
You sound like my mom. "That's so weird, it's like drugs, but it's there!!!"
 
lex is a lexical analyzer, also called a parser or a lexer. It determines what "words" are present and emits a string of tokens that correspond to them.

It has long been proprietary, and an open-source imitation of it has been written: flex.

yacc is "Yet Another Compiler Compiler". It takes a string of tokens and constructs a syntax tree from them.

It also has some open-source imitations, like GNU bison.

So it would do something like turn a*b + c*(d-e) into
Code:
+
. *
. . a
. . b
. *
. . c
. . -
. . . d
. . . e
 
https://www.ibm.com/developerworks/aix/tutorials/au-lexyacc/index.html

yacc and lex are tools you can use to create your own math language.

GNU packages should be available. The link has a shorrt tutorial/

You can

create a language with math expressions and logical expressions
create a lexical analyzer that parses the expressions
compile it

Have fun. Beats video games.

Well, programmation is all you need. I remember programming a multiplication and division calculator without limit to the size of the input or to precision beyond that of the memory. That is fun.

And, as you said, 3 x 1/3 never gets to equal 1. :rolleyes:
EB
 
Back
Top Bottom