fixed

Pure Haskell large fixed-width integers.
git clone git://git.ppad.tech/fixed.git
Log | Files | Refs | README | LICENSE

commit fc6cae57cd0293ead91bbba9d250cb3e9901a1e2
parent 9c0401625cd96c6764076f044e3944db332639a3
Author: Jared Tobin <jared@jtobin.io>
Date:   Sat, 25 Jan 2025 20:01:38 +0400

Revert "meta: remove profiling executable"

This reverts commit af7d747625e2200ca1a9b2661dbb95e32bcf448f.

Diffstat:
Mppad-fixed.cabal | 13+++++++++++++
Asrc/Main.hs | 24++++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/ppad-fixed.cabal b/ppad-fixed.cabal @@ -76,3 +76,16 @@ benchmark fixed-weigh , primitive , weigh +executable fixed-profile + default-language: Haskell2010 + hs-source-dirs: src + main-is: Main.hs + + ghc-options: + -rtsopts -O2 -Wall + + build-depends: + base + , criterion + , ppad-fixed + diff --git a/src/Main.hs b/src/Main.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE BangPatterns #-} + +module Main where + +import Data.Word.Extended + +main :: IO () +main = do + let !u = Word576 + 5152276743337338587 + 6823823105342984773 + 12649096328525870222 + 8811572179372364942 + 0 0 0 0 0 + + !d = Word256 + 8849385646123010679 + 653197174784954101 + 1286679968202709238 + 3741537094902495500 + + let foo = quotrem u d + print foo +