let frama_C_cos state actuals =
  match actuals with
    [_, arg, _] ->
      begin
        let r =
          try
            let i = Cvalue_type.V.project_ival arg in
            let f = Ival.project_float i in
            Cvalue_type.V.inject_ival
              (Ival.inject_float (Ival.Float_abstract.cos_float f))
          with Cvalue_type.V.Not_based_on_null ->
            Value_parameters.result ~once:true ~current:true
              "Builtin Frama_C_cos applied to address";
            Cvalue_type.V.topify_arith_origin arg
        in
        (wrap_double r), state, Locations.Location_Bits.Top_Param.bottom
      end
  | _ ->
      Value_parameters.error "Invalid argument for Frama_C_cos function";
      Value_util.do_degenerate None;
      raise Db.Value.Aborted