summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric/should_compile/T7116.hs
blob: cdaa432dbd352e4e08f02da3ed512bb199634401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module T7116 where

-- this module tests strength reduction, i.e. turning floating
-- point multiplication by two into addition:
--
-- 2.0 * x -> x + x

dl :: Double -> Double
dl x = 2.0 * x

dr :: Double -> Double
dr x = x * 2.0

fl :: Float -> Float
fl x = 2.0 * x

fr :: Float -> Float
fr x = x * 2.0