z3 / src / math / subpaving / subpaving_mpf.h

Copyright (c) 2012 Microsoft Corporation

Module Name:



    Subpaving for non-linear arithmetic using multi-precision floats.


    Leonardo de Moura (leonardo) 2012-07-31.

Revision History:

#ifndef __SUBPAVING_MPF_H_
#define __SUBPAVING_MPF_H_


namespace subpaving {

struct config_mpf {
    f2n<mpf_manager> & m_manager;
    typedef f2n<mpf_manager>            numeral_manager;
    typedef mpf                         numeral;
    typedef f2n<mpf_manager>::exception exception;

    static void round_to_minus_inf(numeral_manager & m) { m.round_to_minus_inf(); }
    static void round_to_plus_inf(numeral_manager & m)  { m.round_to_plus_inf(); }
    static void set_rounding(numeral_manager & m, bool to_plus_inf)  { m.set_rounding(to_plus_inf); }
    config_mpf(f2n<mpf_manager> & m):m_manager(m) {}
    f2n<mpf_manager> & m() const { return const_cast<f2n<mpf_manager> &>(m_manager); }

class context_mpf : public context_t<config_mpf> {
    context_mpf(f2n<mpf_manager> & m, params_ref const & p, small_object_allocator * a):context_t<config_mpf>(config_mpf(m), p, a) {}


Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.