This repository contains a plugin for Herbie to support fixed-point numbers
Fixed-point numbers are defined with n
total bits and a scale factor of 2 ^ s
.
Use in Herbie, by specifying :precision (fixed n s)
.
Alternatively, use :precision integer
for :precision (fixed 32 0)
and :precision (integer n)
for :precision (fixed n 0)
.
This package contains:
- Definitions of fixed-point numbers and their operators for Herbie
- Rewrite rules for these operators
Installation:
- Clone this repository, preferably into a folder called
fixedpoint-herbie
. - If the folder name is
fixedpoint-herbie
, runraco pkg install
within the folder. Otherwise, runraco pkg install -n fixedpoint-herbie
.