I am using Cygwin and gcc to create a function that gets the absolute value of a float. Is fabs the instruction to use to get the absolute value? asm("lea %[nIn],%%edi \n" "fabs \n" "mov %%edi,%[nOut] \n"
: [nOut] "=m" (n) : [nIn] "m" (n)
'n' is a double. What do I pass to fabs or does it check a register?
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.