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