Narrowing conversion from
(double-to-int operand) → result
Function:
(defun double-to-int (operand) (declare (xargs :guard (double-valuep operand))) (b* ((x (double-value->double operand))) (int-value (double-to-int-abs x))))
Theorem:
(defthm int-valuep-of-double-to-int (b* ((result (double-to-int operand))) (int-valuep result)) :rule-classes :rewrite)
Theorem:
(defthm double-to-int-of-double-value-fix-operand (equal (double-to-int (double-value-fix operand)) (double-to-int operand)))
Theorem:
(defthm double-to-int-double-value-equiv-congruence-on-operand (implies (double-value-equiv operand operand-equiv) (equal (double-to-int operand) (double-to-int operand-equiv))) :rule-classes :congruence)