Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
HPReal.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* HPReal.cc (C) 2000-2018 */
9/* */
10/* Réel haute-précision. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArcanePrecomp.h"
15#include "arcane/utils/Iostream.h"
16#include "arcane/utils/HPReal.h"
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21ARCANE_BEGIN_NAMESPACE
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26std::istream& HPReal::
27assign(std::istream& i)
28{
29 i >> m_value >> ws >> m_correction;
30 return i;
31}
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36std::ostream& HPReal::
37print(std::ostream& o) const
38{
39 o << m_value << ' ' << m_correction;
40 return o;
41}
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
46std::ostream& HPReal::
47printPretty(std::ostream& o) const
48{
49 o << '(' << m_value << ',' << m_correction << ')';
50 return o;
51}
52
53/*---------------------------------------------------------------------------*/
54/*---------------------------------------------------------------------------*/
55
56ARCANE_END_NAMESPACE
57
58/*---------------------------------------------------------------------------*/
59/*---------------------------------------------------------------------------*/
60