🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

gmplib

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gmplib

math library for c

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

Overview

GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers.

Installation

$ npm install gmplib

API Reference

Methods

  • mpf_add(number, number)
  • mpf_sub(number, number)
  • mpf_mul(number, number)
  • mpf_div(number, number)
  • mpf_sqrt(number);
  • mpf_pow_ui(number,number);
  • mpf_neg(number);
  • mpf_abs(number);

Example:


var gmplib = require('gmplib');

gmplib.mpf_add(2.2, 2.1);
gmplib.mpf_sub(2.2, 2.1);
gmplib.mpf_mul(2.2, 2.1);
gmplib.mpf_div(2.2, 2.1);
gmplib.mpf_sqrt(9);
gmplib.mpf_pow_ui(2, 3);
gmplib.mpf_neg(4.5);
gmplib.mpf_abs(-4.5);

See Also

  • https://gmplib.org

Keywords

addon

FAQs

Package last updated on 26 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts