Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * This file is part of the cvc5 project. 3 : : * 4 : : * Copyright (c) 2009-2026 by the authors listed in the file AUTHORS 5 : : * in the top-level source directory and their institutional affiliations. 6 : : * All rights reserved. See the file COPYING in the top-level source 7 : : * directory for licensing information. 8 : : * **************************************************************************** 9 : : * 10 : : * The definition of rounding mode values. 11 : : */ 12 : : 13 : : #include "roundingmode.h" 14 : : 15 : : #include <iostream> 16 : : 17 : : #include "base/check.h" 18 : : 19 : : namespace cvc5::internal { 20 : : 21 : 0 : std::ostream& operator<<(std::ostream& os, RoundingMode rm) 22 : : { 23 [ - - ][ - - ]: 0 : switch (rm) [ - - ] 24 : : { 25 : 0 : case RoundingMode::ROUND_NEAREST_TIES_TO_EVEN: 26 : 0 : os << "ROUND_NEAREST_TIES_TO_EVEN"; 27 : 0 : break; 28 : 0 : case RoundingMode::ROUND_TOWARD_POSITIVE: 29 : 0 : os << "ROUND_TOWARD_POSITIVE"; 30 : 0 : break; 31 : 0 : case RoundingMode::ROUND_TOWARD_NEGATIVE: 32 : 0 : os << "ROUND_TOWARD_NEGATIVE"; 33 : 0 : break; 34 : 0 : case RoundingMode::ROUND_TOWARD_ZERO: os << "ROUND_TOWARD_ZERO"; break; 35 : 0 : case RoundingMode::ROUND_NEAREST_TIES_TO_AWAY: 36 : 0 : os << "ROUND_NEAREST_TIES_TO_AWAY"; 37 : 0 : break; 38 : 0 : default: Unreachable(); 39 : : } 40 : 0 : return os; 41 : : } 42 : : 43 : : } // namespace cvc5::internal