Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using bignum library

Featured Replies

Posted

I have a function that converts me from any base to base 10 but the result is very long and it cannot be stored in an integer. Can someone explain me how should i use bignum lib so i can print result?

Depends on which bignum library you use. For example OpenSSL BigNum lib has functions:


char *BN_bn2hex(const BIGNUM *a);
char *BN_bn2dec(const BIGNUM *a);BN_bn2hex() and BN_bn2dec() return printable strings containing the hexadecimal and decimal encoding of a respectively.
For negative numbers, the string is prefaced with a leading '-'. The string must be freed later using OPENSSL_free().

EDIT: fixed formatting.

Edited by kao

  • Author

http://gmplib.org/

I am going to use this library. How should i do it?

You really don't want to search, do you?
/>http://gmplib.org/manual/Formatted-Output.html

ISO-C and most C++ compilers support 64bit integer (long long) and their unsigned equivalents. Maybe that's enough for your needs.

unsigned long long ul64 = 1111111122222222ULL;

Edited by Killboy

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.