This file contains examples of math expressions converted to g-expressions, for use in GCalc

Math Expressiong-expression (Input)Output
1+2+4(+ 1 2 4)7
6*3*1(* 6 3 1)18
3-2-1(- 3 2 1)0
9/3(/ 9 3)3
5-3+4-6(- (+ 5 4) 3 6)0
5^2(^ 5 2)25
log(4)(log 4)1.3862943611198906
sin(pi)(sin pi)0
(3+5)/(4-3)(/ (+ 3 5) (- 4 3))8
x+4(+ x 4)(+ x 4)
3x-4(- (* 3 x) 4)(- (* 3 x) 4)
3x+2x+5(+ (* 3 x) (* 2 x) 5)(+ (* 5 x) 5)
(x+y)/(x+y)^4(/ (+ x y) (^ (+ x y) 4))(^ (+ y x) -3)
(x+2)/(bx+3)(/ (+ x 2) (+ (* b x) 3))(+ (/ x (+ (* b x) 3)) (/ 2 (+ (* b x) 3)))
sin(x)/cos(x)(/ (sin x) (cos x))(/ (sin x) (cos x))
dy/dx(d y x)dy/dx
(d/dx)(e^x)(d (^ e x) x)(^ e x)
(d/dx)(2log(x+y))(d (* 2 (log (+ x y))) x)(+ (/ (* 2 dy/dx) (+ y x)) (/ 2 (+ y x)))
(d/dx)sin(x)(d (sin x) x)(cos x)
dy/dx-y^2-y, where y=x^2-2x+3(let (y (+ (^ x 2) (* -2 x) 3)) (- (d y x) (^ y 2) y))(- (+ (* 2 x) dy/dx) (+ (^ x 2) (^ (- (+ 3 (^ x 2)) (* 2 x)) 2) 3))