2 ms·
Let me tell you one detail: since cmake doesn't have floats, they use fixed point arithmetic. LOOK AT IT. You know you want too! function(sqrt x res) d
by tgv 6y ago
Let me tell you one detail: since cmake doesn't have floats, they use fixed point arithmetic. LOOK AT IT. You know you want too!
function(sqrt x res)
div_by_2(${x} guess)
foreach(counter RANGE 4)
if(${guess} EQUAL 0)
set("${res}" 0 PARENT_SCOPE)
return()
endif()
div(${x} ${guess} tmp)
add(${tmp} ${guess} tmp)
div_by_2(${tmp} guess)
endforeach()
set("${res}" "${guess}" PARENT_SCOPE)
endfunction()