@@ -1662,6 +1662,22 @@ static inline char* xjb16(uint16_t bits, char* buf) {
16621662 memcpy (buf, &exp_result, 8 );
16631663 return buf + exp_len;
16641664}
1665+ static inline char * xjb128 (uint64_t v_hi64, uint64_t v_lo64, char * buf) {
1666+ // todo
1667+ // v = {v_hi64, v_lo64} ; v_hi64 is the highest 64bits, v_lo64 is the lowest 64bits
1668+
1669+ // 128 bit = 1 + 15 + 112; sign + exp + sig
1670+
1671+ return buf;
1672+ }
1673+ static inline char * xjb256 (uint64_t * v,char * buf){
1674+ // todo
1675+ // v = {v[0], v[1], v[2], v[3]} ; v[0] is the highest 64bits, v[3] is the lowest 64bits
1676+
1677+ // 256 bit = 1 + 19 + 236; sign + exp + sig
1678+
1679+ return buf;
1680+ }
16651681} // end of namespace xjb
16661682
16671683/* ==============================================================================
@@ -1676,4 +1692,10 @@ char* xjb_ftoa(float v, char* buf) {
16761692}
16771693char * xjb_ftoa (double v, char * buf) {
16781694 return xjb::xjb64 (v, buf);
1695+ }
1696+ char * xjb_ftoa (uint64_t v_hi64, uint64_t v_lo64, char * buf) {
1697+ return xjb::xjb128 (v_hi64, v_lo64, buf);
1698+ }
1699+ char * xjb_ftoa (uint64_t * v, char * buf) {
1700+ return xjb::xjb256 (v, buf);
16791701}
0 commit comments