Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MiniTLS-HTTPS-Example
fp_ident.c
00001 /* TomsFastMath, a fast ISO C bignum library. 00002 * 00003 * This project is meant to fill in where LibTomMath 00004 * falls short. That is speed ;-) 00005 * 00006 * This project is public domain and free for all purposes. 00007 * 00008 * Tom St Denis, tomstdenis@gmail.com 00009 */ 00010 #include "tfm.h" 00011 00012 const char *fp_ident(void) 00013 { 00014 static char buf[1024]; 00015 00016 memset(buf, 0, sizeof(buf)); 00017 snprintf(buf, sizeof(buf)-1, 00018 "TomsFastMath (%s)\n" 00019 "\n" 00020 "Sizeofs\n" 00021 "\tfp_digit = %u\n" 00022 "\tfp_word = %u\n" 00023 "\n" 00024 "FP_MAX_SIZE = %u\n" 00025 "\n" 00026 "Defines: \n" 00027 #ifdef __i386__ 00028 " __i386__ " 00029 #endif 00030 #ifdef __x86_64__ 00031 " __x86_64__ " 00032 #endif 00033 #ifdef TFM_X86 00034 " TFM_X86 " 00035 #endif 00036 #ifdef TFM_X86_64 00037 " TFM_X86_64 " 00038 #endif 00039 #ifdef TFM_SSE2 00040 " TFM_SSE2 " 00041 #endif 00042 #ifdef TFM_ARM 00043 " TFM_ARM " 00044 #endif 00045 #ifdef TFM_PPC32 00046 " TFM_PPC32 " 00047 #endif 00048 #ifdef TFM_AVR32 00049 " TFM_AVR32 " 00050 #endif 00051 #ifdef TFM_ECC192 00052 " TFM_ECC192 " 00053 #endif 00054 #ifdef TFM_ECC224 00055 " TFM_ECC224 " 00056 #endif 00057 #ifdef TFM_ECC384 00058 " TFM_ECC384 " 00059 #endif 00060 #ifdef TFM_ECC521 00061 " TFM_ECC521 " 00062 #endif 00063 00064 #ifdef TFM_NO_ASM 00065 " TFM_NO_ASM " 00066 #endif 00067 #ifdef FP_64BIT 00068 " FP_64BIT " 00069 #endif 00070 #ifdef TFM_HUGE 00071 " TFM_HUGE " 00072 #endif 00073 "\n", __DATE__, sizeof(fp_digit), sizeof(fp_word), FP_MAX_SIZE); 00074 00075 if (sizeof(fp_digit) == sizeof(fp_word)) { 00076 strncat(buf, "WARNING: sizeof(fp_digit) == sizeof(fp_word), this build is likely to not work properly.\n", 00077 sizeof(buf)-1); 00078 } 00079 return buf; 00080 } 00081 00082 #ifdef STANDALONE 00083 00084 int main(void) 00085 { 00086 printf("%s\n", fp_ident()); 00087 return 0; 00088 } 00089 00090 #endif 00091 00092 00093 /* $Source: /cvs/libtom/tomsfastmath/src/misc/fp_ident.c,v $ */ 00094 /* $Revision: 1.1 $ */ 00095 /* $Date: 2006/12/31 21:25:53 $ */
Generated on Wed Jul 13 2022 00:22:54 by
1.7.2