ColdFusion UDF: Calculate A Number's Divisors

Here's another UDF I was tinkering with last week. I wanted to be able to count all of the numbers that divided evenly into a given integer. I couldn't find a ColdFusion implementation, so after getting some advice from Stack Overflow I created my own.

[More]

Calculate Prime Numbers: Sieve of Eratosthenes

Ahh... the quintessential math problem-- finding prime numbers. Last week while tinkering with a math challenge I needed to find all of the primes up to a given number. There was a version on cflib.org, but I thought I could do it in less code, so I dug in myself.

[More]



BlogCFC was created by Raymond Camden. This blog is running version 5.9.5. Contact Blog Owner