Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  utils.hxx   Sprache: C

 
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */


#pragma once

#include <sstream>

namespace sc::opencl
{
// The way ostream handles floating point output is pretty broken for our usecase.
// The default precision (6) is low, leading to possible precision loss of constant
// float arguments in the generated code. Moreover numbers without a fractional
// part will be printed as e.g. '2', making them integers in the generated code
// (causing problems e.g. with floor() overloads being ambiguous). The std::showpoint
// manipulator forces a decimal point, but then all numbers will be printed
// at the maximum precision even with insignificant trailing 0's, making the numbers
// a pain to read.
// And these flags need to be set on every std::stringstream instance we use,
// which may be easy to omit.
// So as a solution to this:
// - provide our own wrapper class
// - prohibit direct usage of std::stringstream

class outputstream : public std::stringstream
{
private:
    typedef std::stringstream base;

public:
    outputstream();
};

// Returns a string containing the string representation of the given floating pointer number.
// Unlike printf/iostream, this tries to be as precise and representative as possible
// (it always includes a decimal point, and it uses the highest precision necessary/possible).
std::string preciseFloat(double f);
std::string preciseFloat(long double f) = delete// we do not use these

#define stringstream do_not_use_std_stringstream
// namespace

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5
C=91 H=92 G=91

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge