@@ -438,6 +438,72 @@ inline ieee_float_op_exprt &to_ieee_float_op_expr(exprt &expr)
438438 return ret;
439439}
440440
441+ // / \brief IEEE floating-point mod
442+ // /
443+ // / Note that this expression does not have a rounding mode.
444+ class floatbv_mod_exprt : public binary_exprt
445+ {
446+ public:
447+ floatbv_mod_exprt (exprt _lhs, exprt _rhs)
448+ : binary_exprt(_lhs, ID_floatbv_mod, _rhs, _lhs.type())
449+ {
450+ }
451+ };
452+
453+ // / \brief Cast an exprt to a \ref floatbv_mod_exprt
454+ // /
455+ // / \a expr must be known to be \ref floatbv_mod_exprt.
456+ // /
457+ // / \param expr: Source expression
458+ // / \return Object of type \ref floatbv_mod_exprt
459+ inline const floatbv_mod_exprt &to_floatbv_mod_expr (const exprt &expr)
460+ {
461+ PRECONDITION (expr.id () == ID_floatbv_mod);
462+ floatbv_mod_exprt::check (expr);
463+ return static_cast <const floatbv_mod_exprt &>(expr);
464+ }
465+
466+ // / \copydoc to_floatbv_mod_expr(const exprt &)
467+ inline floatbv_mod_exprt &to_floatbv_mod_expr (exprt &expr)
468+ {
469+ PRECONDITION (expr.id () == ID_floatbv_mod);
470+ floatbv_mod_exprt::check (expr);
471+ return static_cast <floatbv_mod_exprt &>(expr);
472+ }
473+
474+ // / \brief IEEE floating-point rem
475+ // /
476+ // / Note that this expression does not have a rounding mode.
477+ class floatbv_rem_exprt : public binary_exprt
478+ {
479+ public:
480+ floatbv_rem_exprt (exprt _lhs, exprt _rhs)
481+ : binary_exprt(_lhs, ID_floatbv_rem, _rhs, _lhs.type())
482+ {
483+ }
484+ };
485+
486+ // / \brief Cast an exprt to a \ref floatbv_rem_exprt
487+ // /
488+ // / \a expr must be known to be \ref floatbv_rem_exprt.
489+ // /
490+ // / \param expr: Source expression
491+ // / \return Object of type \ref floatbv_rem_exprt
492+ inline const floatbv_rem_exprt &to_floatbv_rem_expr (const exprt &expr)
493+ {
494+ PRECONDITION (expr.id () == ID_floatbv_rem);
495+ floatbv_rem_exprt::check (expr);
496+ return static_cast <const floatbv_rem_exprt &>(expr);
497+ }
498+
499+ // / \copydoc to_floatbv_rem_expr(const exprt &)
500+ inline floatbv_rem_exprt &to_floatbv_rem_expr (exprt &expr)
501+ {
502+ PRECONDITION (expr.id () == ID_floatbv_rem);
503+ floatbv_rem_exprt::check (expr);
504+ return static_cast <floatbv_rem_exprt &>(expr);
505+ }
506+
441507// / \brief returns the a rounding mode expression for a given
442508// / IEEE rounding mode, encoded using the recommendation in
443509// / C11 5.2.4.2.2
0 commit comments