Search results

Jump to navigation Jump to search
  • g x = sqrt y + x g y x = sqrt y + x
    3 KB (453 words) - 19:08, 19 January 2011
  • taylor_n_bound = sqrt $ sqrt epsilon
    711 bytes (109 words) - 16:35, 15 November 2006
  • normize v = (1/sqrt (dot v v)).*v tetrahed = [V (x*sqrt 1.5) (-sqrt 2/3) (-1/3)|x<-[-1,1]]++
    5 KB (922 words) - 15:33, 18 November 2008
  • f x = sqrt ( fromIntegral f x = sqrt (fromIntegral ((x * 10133123) `mod` 1231111121 :: Int))
    3 KB (355 words) - 20:09, 18 January 2007
  • ...atural numbers ''n <= sqrt k''. We need only check the '''''primes''' p <= sqrt k'': where s = floor $ sqrt $ fromIntegral n
    3 KB (432 words) - 07:06, 11 May 2016
  • Rationals are precise but <hask>pi</hask> and <hask>sqrt 2</hask> are not rational. isSquare n = (round . sqrt $ fromIntegral n) ^ 2 == n
    6 KB (847 words) - 12:16, 29 December 2010
  • xm=floor$sqrt $fromIntegral c f(-2) z = xy/sqrt(x^2 + y^2)
    7 KB (1,180 words) - 01:49, 13 February 2010
  • ( sqrt ( -delta ) / ( 2 * a ) ) |otherwise = Real ( ( -b + sqrt ( delta ) ) / ( 2 * a ) )
    4 KB (640 words) - 05:52, 20 November 2008
  • (a2 + sqrt dk) (a2 + sqrt dk)
    13 KB (1,795 words) - 04:56, 17 July 2007
  • evenFib n = round $ (2 + sqrt 5) ** (fromIntegral n) / sqrt 5 floor $ (log (fromIntegral n - 0.5) + 0.5*log 5) / log (2 + sqrt 5)
    6 KB (881 words) - 02:31, 8 May 2016
  • m = (truncate (sqrt (fromIntegral r)) + n) `div` d where x = floor . sqrt . fromIntegral $ n
    9 KB (1,356 words) - 13:14, 1 July 2011
  • ...ied to <hask>Floating</hask>-point numbers. Instead, one must write <hask>sqrt (fromIntegral n)</hask> to explicitly convert <hask>n</hask> to a floating-
    6 KB (867 words) - 01:28, 14 April 2016
  • ...ch is slightly more verbose but only checks for primality up to (ceiling $ sqrt n); and is thus much faster. factor n = let divisors = dropWhile ((/= 0) . mod n) [2 .. ceiling $ sqrt $ fromIntegral n]
    3 KB (485 words) - 19:45, 18 January 2014
  • isSquare n = (round . sqrt $ fromIntegral n) ^ 2 == n len = (sqrt . normSq) v
    9 KB (1,266 words) - 10:51, 12 February 2010
  • vmag = sqrt . vmag_sqr
    2 KB (410 words) - 14:10, 18 April 2007
  • ratio = toRational (2/(1+sqrt(5)::Double)) -- golden
    2 KB (204 words) - 18:56, 26 October 2009
  • | otherwise = sqrt $! vBv / vv | otherwise = sqrt $! vBv / vv
    16 KB (2,603 words) - 06:09, 21 February 2010
  • in (divided, sqrt norm2) divideBySqrtIInorm2 vector scalar = scaleIInorm2 vector (1 / sqrt scalar)
    12 KB (1,607 words) - 10:48, 12 February 2010
  • ...plied to too few arguments (perhaps none) like <code>(+) 2</code> or <code>sqrt</code>.
    2 KB (253 words) - 22:16, 5 April 2021
  • mysqrt a = sqrt a mysqrtCPS a k = k (sqrt a)
    10 KB (1,560 words) - 12:02, 15 April 2024
  • ...me</code> tests numbers by ''trial division'' using (up to<math>\textstyle\sqrt b</math>) a memoized primes list produced by sieve of Eratosthenes to which For ''very wide'' ranges, specifically when <math>\textstyle a < \sqrt{b}</math>, we're better off just using the primes sequence itself, without
    5 KB (696 words) - 19:46, 18 January 2014
  • 12 / sqrt 640320 ^ 3
    4 KB (652 words) - 02:04, 7 February 2009
  • ratio = toRational (2/(1+sqrt(5)::Double))
    3 KB (377 words) - 16:08, 8 December 2009
  • (cons "\\<\\(sqrt\\)\\>" 'square-root)
    5 KB (424 words) - 10:46, 18 May 2012
  • *<math> \sqrt{\ } = \{(0,0), (1,1), (4,2), (9,3), \dots \} </math>
    3 KB (430 words) - 00:30, 1 February 2016
  • = sqrt (x * x + y * y)
    3 KB (430 words) - 11:59, 19 April 2021
  • let distance = sqrt . magnitude2 $ p1 .-. p2 distance = sqrt distance2
    85 KB (11,049 words) - 06:08, 21 February 2010
  • truncate . sqrt . fromIntegral $ (hi `div` 2)
    7 KB (917 words) - 18:29, 21 February 2010
  • len v = sqrt (v *. v) dist p0 p1 = sqrt ((p1 <-> p0) *. (p1 <-> p0))
    23 KB (3,591 words) - 20:03, 12 May 2008
  • ...code> takes a number and returns the square root of that number, <code>map sqrt</code> takes a ''list'' of numbers and returns a ''list'' of their square r
    15 KB (2,547 words) - 21:58, 29 October 2011
  • n <- [1..floor (sqrt 1000)], m <- [n+1..floor (sqrt 1000)],
    11 KB (1,557 words) - 09:03, 19 September 2014
  • tiled = named "T" $ Tall 1 (5/100) (2/(1+(toRational(sqrt(5)::Double))))
    8 KB (889 words) - 03:53, 6 October 2011
  • Prelude> <hask>sqrt 2</hask>
    14 KB (1,168 words) - 07:39, 12 February 2012
  • | otherwise = sqrt $! vBv / vv | otherwise = sqrt $! vBv / vv
    13 KB (1,875 words) - 22:33, 22 January 2012
  • [n | n<-[2..], all ((> 0).rem n) [2..floor.sqrt.fromIntegral$n]] 2 : [n | n<-[3,5..], all ((> 0).rem n) [3,5..floor.sqrt.fromIntegral$n]]
    18 KB (2,583 words) - 20:08, 19 December 2020
  • m = (truncate (sqrt (fromIntegral r)) + n) `div` d u = k*yn+l -- u/v is the i-th convergent of sqrt(d)
    6 KB (979 words) - 10:20, 18 May 2022
  • :Prelude> <hask>sqrt 2</hask>
    17 KB (1,020 words) - 07:22, 9 June 2023
  • * Sharing is easy, i.e. in <hask>sqrt pi + sin pi</hask>, <hask>pi</hask> is computed only once * Sharing of temporary results is difficult, that is, in <hask>sqrt pi + sin pi</hask>, <hask>pi</hask> ''will'' be computed twice, each time w
    21 KB (2,880 words) - 09:43, 4 May 2024
  • ratio = toRational (2/(1 + sqrt 5 :: Double)) -- golden, thx Octoploid
    13 KB (1,171 words) - 02:25, 9 October 2011
  • ratio = toRational (2/(1+sqrt(5)::Double))
    12 KB (1,515 words) - 15:23, 5 January 2008
  • sq5 = sqrt 5 :: Double
    8 KB (1,150 words) - 15:41, 5 July 2022
  • where (ai, af) = properFraction . sqrt $ 1 + 24 * (fromInteger n)
    12 KB (1,626 words) - 05:45, 9 March 2021
  • (truncate $ sqrt $ fromIntegral x)^2 == x
    21 KB (3,012 words) - 03:07, 8 December 2011
  • * square / sqrt / distance? - also supported (less well), again I haven't done anything.
    10 KB (1,671 words) - 03:59, 16 August 2014
  • test = V.foldl (\ a b -> a * sqrt (fromIntegral b)) 0
    23 KB (3,342 words) - 19:28, 25 April 2013
  • slow way of doing a '''sqrt'''. (a2 + 1 / sqrt k)
    25 KB (3,873 words) - 11:08, 6 March 2023
  • ratio = toRational (2/(1+sqrt(5)::Double))
    19 KB (2,315 words) - 15:36, 4 December 2012
  • Prelude> sqrt 2
    15 KB (2,246 words) - 23:44, 15 May 2012
  • z = ceiling $ sqrt $ fromIntegral a + 1 -- p2>=z => p2*p2>a (h,ps) = span (<= (floor.sqrt $ fromIntegral m+1)) ops
    58 KB (8,594 words) - 20:34, 6 May 2023
  • Prelude> sqrt 2
    13 KB (1,986 words) - 17:59, 9 August 2019

View (previous 50 | next 50) (20 | 50 | 100 | 250 | 500)