Advertisement
banovski

Pi's

Dec 7th, 2020 (edited)
1,824
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. main =
  2.   print
  3.     [ (a, c, d)
  4.     | a <- [4 .. 10000]
  5.     , let b = a / 3.141592654
  6.           c = fromInteger (round b)
  7.           d = a / c
  8.     , d > 3.141591653
  9.     , d < 3.141593655
  10.     ]
  11.  
  12.  
  13. -- [(355.0, 113.0, 3.1415929203539825), (710.0, 226.0, 3.1415929203539825), (1065.0, 339.0, 3.1415929203539825), (1420.0, 452.0, 3.1415929203539825), (1775.0, 565.0, 3.1415929203539825), (2130.0, 678.0, 3.1415929203539825), (2485.0, 791.0, 3.1415929203539825), (2840.0, 904.0, 3.1415929203539825), (3195.0, 1017.0, 3.1415929203539825), (3550.0, 1130.0, 3.1415929203539825), (3905.0, 1243.0, 3.1415929203539825), (4260.0, 1356.0, 3.1415929203539825), (4615.0, 1469.0, 3.1415929203539825), (4970.0, 1582.0, 3.1415929203539825), (5325.0, 1695.0, 3.1415929203539825), (5680.0, 1808.0, 3.1415929203539825), (6035.0, 1921.0, 3.1415929203539825), (6390.0, 2034.0, 3.1415929203539825), (6745.0, 2147.0, 3.1415929203539825), (7100.0, 2260.0, 3.1415929203539825), (7455.0, 2373.0, 3.1415929203539825), (7810.0, 2486.0, 3.1415929203539825), (8165.0, 2599.0, 3.1415929203539825), (8520.0, 2712.0, 3.1415929203539825), (8875.0, 2825.0, 3.1415929203539825), (9230.0, 2938.0, 3.1415929203539825), (9585.0, 3051.0, 3.1415929203539825), (9940.0, 3164.0, 3.1415929203539825)]
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement