Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
libm = LibC.dlopen("libm.so.6", LibC::RTLD_LAZY)
|
||||
sqrtptr = LibC.dlsym(libm, "sqrt") unless libm.null?
|
||||
|
||||
if sqrtptr
|
||||
sqrtproc = Proc(Float64, Float64).new sqrtptr, Pointer(Void).null
|
||||
at_exit { LibC.dlclose(libm) }
|
||||
else
|
||||
sqrtproc = ->Math.sqrt(Float64)
|
||||
end
|
||||
|
||||
puts "the sqrt of 4 is #{sqrtproc.call(4.0)}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue