GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/util/roundingmode.cpp Lines: 1 18 5.6 %
Date: 2021-08-01 Branches: 2 14 14.3 %

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