(* ********************************************************************* Vorgegebene Funktionsdefinitionen: ********************************************************************* *) exception arithmetik_nicht_verfuegbar; fun n + m : int = raise arithmetik_nicht_verfuegbar; fun n + m : real = raise arithmetik_nicht_verfuegbar; fun n - m : int = raise arithmetik_nicht_verfuegbar; fun n - m : real = raise arithmetik_nicht_verfuegbar; fun n * m : int = raise arithmetik_nicht_verfuegbar; fun n * m : real = raise arithmetik_nicht_verfuegbar; fun n div m : int = raise arithmetik_nicht_verfuegbar; fun n / m : real = raise arithmetik_nicht_verfuegbar; fun vorgaenger(n) = Word.toInt( Word.-(Word.fromInt(n), 0wx1) ); fun summe(n,m) = Word.toInt( Word.+(Word.fromInt(n), Word.fromInt(m)) ); fun ist_gerade(n) = ( Word.andb(Word.fromInt(n),0wx1) = 0wx0 ); fun doppelt(n) = Word.toInt( Word.<<( Word.fromInt(n), 0wx1) ); fun haelfte(n) = Word.toInt( Word.>>( Word.fromInt(n), 0wx1) ); (* ********************************************************************* BITTE OBERHALB VON DIESEM KOMMENTAR NICHTS VERAENDERN! Verlangte Funktionsdefinitionen: ********************************************************************* *)