summaryrefslogtreecommitdiff
path: root/src/util/roundingmode.cpp
blob: 00aec6635782333197fddb9c413af8a192f00c77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/******************************************************************************
 * Top contributors (to current version):
 *   Andres Noetzli
 *
 * This file is part of the cvc5 project.
 *
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
 * in the top-level source directory and their institutional affiliations.
 * All rights reserved.  See the file COPYING in the top-level source
 * directory for licensing information.
 * ****************************************************************************
 *
 * The definition of rounding mode values.
 */

#include "roundingmode.h"

#include <iostream>

#include "base/check.h"

namespace cvc5 {

std::ostream& operator<<(std::ostream& os, RoundingMode rm)
{
  switch (rm)
  {
    case RoundingMode::ROUND_NEAREST_TIES_TO_EVEN:
      os << "ROUND_NEAREST_TIES_TO_EVEN";
      break;
    case RoundingMode::ROUND_TOWARD_POSITIVE:
      os << "ROUND_TOWARD_POSITIVE";
      break;
    case RoundingMode::ROUND_TOWARD_NEGATIVE:
      os << "ROUND_TOWARD_NEGATIVE";
      break;
    case RoundingMode::ROUND_TOWARD_ZERO: os << "ROUND_TOWARD_ZERO"; break;
    case RoundingMode::ROUND_NEAREST_TIES_TO_AWAY:
      os << "ROUND_NEAREST_TIES_TO_AWAY";
      break;
    default: Unreachable();
  }
  return os;
}

}  // namespace cvc5
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback