1 // 2 // imaxabs.cpp 3 // 4 // Copyright (c) Microsoft Corporation. All rights reserved. 5 // 6 // Defines imaxabs(), which computes the absolute value of an intmax_t. 7 // 8 #include <inttypes.h> 9 10 11 12 extern "C" intmax_t __cdecl imaxabs(intmax_t const number) 13 { 14 return number < 0 ? -number : number; 15 } 16 17 18 19 /* 20 * Copyright (c) 1992-2010 by P.J. Plauger. ALL RIGHTS RESERVED. 21 * Consult your license regarding permissions and restrictions. 22 V5.30:0009 */ 23