Skip to content

grame-cncm/interval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

72421ee · Mar 12, 2024
Jan 24, 2023
Aug 20, 2023
Mar 12, 2024
Dec 30, 2022
May 4, 2023
Aug 30, 2023
Feb 22, 2024
Aug 20, 2023
Apr 4, 2020
Mar 12, 2024
Dec 30, 2022
Jan 24, 2023
Sep 28, 2022
Mar 7, 2024
May 4, 2023

Repository files navigation

C/C++ CIC/C++ CIC/C++ CI

Intervals

A simple interval library for the Faust compiler.

Purposes of intervals as used by the Faust compiler

  • determine the size of a delay line
  • check that a Faust program will execute correctly, without producing infinite or NAN values
  • compute the precision needed for fix-point and fpga implementations
  • detect and report errors at compile time

Definition of an interval

An interval is a triplet <lo,hi,lsb> where:

  • lo: is the lowest value
  • hi: is the highest value
  • lsb: is the least significant bit
  • The msb can be deduced from lo and hi

An interval represent integer values if lo and hi are integers and if lsb >= 0

Organization of the code

All the code is encapsulated in the namespace 'itv'. It is organized as follows:

  • interval_def.hh : defines intervals as data structures with some very basic methods to access the fields
  • interval_algebra.hh/cpp: class gathering all operations on intervals as defined by Faust primitives.
  • intervalXXX.cpp: implementation of the XXX operation on intervals.