Concurrency in Julia
Concurrency in Julia
Posted Nov 10, 2021 22:28 UTC (Wed) by mathstuf (subscriber, #69389)In reply to: Concurrency in Julia by droundy
Parent article: Concurrency in Julia
Posted Nov 12, 2021 4:34 UTC (Fri)
by droundy (subscriber, #4559)
[Link] (1 responses)
Posted Nov 12, 2021 6:29 UTC (Fri)
by rsidd (subscriber, #2582)
[Link]
Concurrency in Julia
Even for factorial, the parameter type can be anything, the function body can convert it to bigint if needed.
Concurrency in Julia
julia> function factorial(n::Integer)
return prod(1:convert(BigInt,n))
end
factorial (generic function with 1 method)
julia> factorial(convert(Int32,100))
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000