class Z3::RoundingModeSort

Overview

The way an operation rounds, as a Z3 value - IEEE says every arithmetic operation names one, so every FloatExpr method which rounds takes one.

The sort has exactly five elements, and they're the class methods below. It's also an ordinary sort, so RoundingModeSort.var("m") hands the choice to the solver, and a model answers with one of the five.

Defined in:

z3/rounding_mode_sort.cr

Class Method Summary

Class Method Detail

def self.[](expr : RoundingModeExpr) #

[View source]
def self.cast(value) : RoundingModeExpr #

A rounding mode has no Crystal counterpart to be cast from - the five above are the only values there are


[View source]
def self.from_ast(ast : LibZ3::Ast) : RoundingModeExpr #

[View source]
def self.nearest_ties_away #

[View source]
def self.nearest_ties_even #

Ties are the values exactly between two floats, which is the only case the first two disagree on - 2.5 rounds to 2.0 one way and 3.0 the other


[View source]
def self.to_s(io) #

[View source]
def self.to_unsafe #

[View source]
def self.towards_negative #

[View source]
def self.towards_positive #

[View source]
def self.towards_zero #

[View source]
def self.var(name : String) #

[View source]