]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/ng_assembly/num/word24.ma
freescale porting
[helm.git] / helm / software / matita / contribs / ng_assembly / num / word24.ma
index c0e0d935cabb191aab51689c6ee73a9ab58838b0..4aabde7710cf2124ca4eb7be29a96344acff3a4c 100755 (executable)
@@ -192,6 +192,11 @@ ndefinition compl_w24 ≝
  [ true ⇒ succ_w24 (not_w24 w)
  | false ⇒ not_w24 (pred_w24 w) ].
 
+(* operatore abs *)
+ndefinition abs_w24 ≝
+λw:word24.match getMSB_w24 w with
+ [ true ⇒ compl_w24 w | false ⇒ w ].
+
 (* operatore x in [inf,sup] o in sup],[inf *)
 ndefinition inrange_w24 ≝
 λx,inf,sup:word24.