#! mavscript-yacas TEMPLATE.txt
# oder / or
#! mavscript --yacas --init lib/init.ys TEMPLATE.txt


mavscript-yacas
---------------

Eingabe / input:
Länge / length §m l := 10.30 §i m
Breite / width §m b :=  2.37 §i m
Höhe / hight   §m h :=  4.80 §i m

Ausgabe / output:
Das Volumen beträgt §m nf(V := l*b*h,1) §o m³
Twice the volume is §m 2*V §o m³

Das Objekt ist §m If (l>b, "länger als breit", "breiter als lang") §o.
The object is rather §m If (h>b, "high", "wide") §o.

Ein Würfel mit dem selben Volumen §m nf(V,0) §o m³ hat die Seitenlänge
A cube of that volume has the side length
§m a := V^(1/3) §i = §m nf(a) §o ≈ §m nf(a,2) §o m.


# Anmerkungen / Notes
# -------------------
# Die Datei lib/init.ys definiert einige Funktionen, die zusammen mit Mavscript nützlich sind.
# Der Aufruf mavscript-yacas lädt diese Datei, bevor die Vorlage verarbeitet wird.
#
# nf(25/7, 3);  --> 3.571                     Zahlenwert, mit 3 Stellen nach dem Komma
# nf(25/7);     --> 3.57142857142857142857    Zahlenwert (statt Bruch)
# y :~ 25/7;    --> 3.57142857142857142857    Zuweisung des ausgewerteten Zahlenwertes (statt y:=25/7 --> 25/7)

# The file lib/init.ys defines some functions that are useful with mavscript.
# The command mavscript-yacas loads that file prior to process the template.
# 
# nf(25/7, 3);  --> 3.571                     numerical value, with 3 decimal places
# nf(25/7);     --> 3.57142857142857142857    numerical value (instead of fraction)
# y :~ 25/7;    --> 3.57142857142857142857    assignment of evaluated numerical value (instead of y:=25/7 --> 25/7)
