Decimals.jl - Pure Julia decimal arithmetic library.

  •        22

Basic routines for decimal arithmetic in Julia. Supports addition, subtraction, negation, multiplication, division, and equality operations; exponentiation coming as soon as I find the time to write it. This is a pure Julia implementation, so if you are concerned about pure speed, calling libmpdec functions directly is likely to be faster. Tested in Julia 0.6. Clearly, this is not okay for fields like finance, where it's important to be able to trust that $0.30 is actually 30 cents, rather than 30.000000000000004 cents.

https://github.com/JuliaMath/Decimals.jl

Tags
Implementation
License
Platform

   




Related Projects

0.30000000000000004 - Floating Point Math Examples

  •    HTML

Your language isn't broken, it's doing floating point math. Computers can only natively store integers, so they need some way of representing decimal numbers. This representation comes with some degree of inaccuracy. That's why, more often than not, .1 + .2 != .3. Why does this happen? It's actually pretty simple. When you have a base 10 system (like ours), it can only express fractions that use a prime factor of the base. The prime factors of 10 are 2 and 5. So 1/2, 1/4, 1/5, 1/8, and 1/10 can all be expressed cleanly because the denominators all use prime factors of 10. In contrast, 1/3, 1/6, and 1/7 are all repeating decimals because their denominators use a prime factor of 3 or 7. In binary (or base 2), the only prime factor is 2. So you can only express fractions cleanly which only contain 2 as a prime factor. In binary, 1/2, 1/4, 1/8 would all be expressed cleanly as decimals. While, 1/5 or 1/10 would be repeating decimals. So 0.1 and 0.2 (1/10 and 1/5) while clean decimals in a base 10 system, are repeating decimals in the base 2 system the computer is operating in. When you do math on these repeating decimals, you end up with leftovers which carry over when you convert the computer's base 2 (binary) number into a more human readable base 10 number.

Julia.jl - Curated decibans of Julia language.

  •    Julia

Julia.jl aggregates and curates decibans of knowledge resources for programming in Julia, an all-purpose programming language that addresses the needs of high-performance numerical analysis and computational science. For Base packages, check if the package you seek is listed in the built-in package manager on github, or check METADATA for registered Julia packages, then use the built-in package manager to install it after checking the requirements for respective versions. Pkg3.jl is an alpha next-generation package manager for Julia that creates a Manifest.toml file that records the exact versions of each dependency and their transitive dependencies.

HDF5.jl - Saving and loading Julia variables

  •    Julia

Saving and loading Julia variables

Sharepoint Massive List Fields Creator

  •    

Tool for create list fields based on a text file definition easier than the XML Schema of Sharepoint, supporting Text, Choice, MultiChoice, DateTime, Boolean, MultiLine, User, UserMulti, Integer, Numeric with Decimals. I have used this tool for create and replicate a very larg...

decimal - Arbitrary-precision fixed-point decimal numbers in go

  •    Go

Arbitrary-precision fixed-point decimal numbers in go.NOTE: can "only" represent numbers with a maximum of 2^31 digits after the decimal point.


twitter-cldr-rb - Ruby implementation of the ICU (International Components for Unicode) that uses the Common Locale Data Repository to format dates, plurals, and more

  •    Ruby

TwitterCldr uses Unicode's Common Locale Data Repository (CLDR) to format certain types of text into their localized equivalents. Currently supported types of text include dates, times, currencies, decimals, percentages, and symbols.TwitterCldr patches core Ruby objects like Integer and Date to make localization as straightforward as possible.

bn.js - BigNum in pure javascript

  •    Javascript

Note: decimals are not supported in this library.Prefixes/postfixes are put in parens at the of the line. endian - could be either le (little-endian) or be (big-endian).

BigDecimal.js - Arbitrary-precision decimals library for JavaScript

  •    Javascript

This is a copy of version 1.0.1 of the STZ-IDA JavaScript translation of the com.ibm.icu.math.BigDecimal and com.ibm.icu.math.MathContext Java classes from the ICU4J project. This version includes a small bug fix in the implementation of the pow() function. See this answer on Stack Overflow for more information (note that you will need 10K+ reputation on Stack Overflow in order to view the answer because the question was deleted by a moderator).

jl - Functional sed for JSON

  •    Haskell

jl ("JSON lambda") is a tiny functional language for querying and manipulating JSON. Binary releases for Linux and OS X are available here.

julia - The Julia Language: A fresh approach to technical computing.

  •    Julia

Julia is a high-level, high-performance dynamic language for technical computing. The main homepage for Julia can be found at julialang.org. This is the GitHub repository of Julia source code, including instructions for compiling and installing Julia, below. New developers may find the notes in CONTRIBUTING helpful to start contributing to the Julia codebase.

learn-julia-the-hard-way - Learn Julia the hard way!

  •    Makefile

The Julia base package is pretty big, although at the same time, there are lots of other packages around to expand it with. The result is that on the whole, it is impossible to give a thorough overview of all that Julia can do in just a few brief exercises. Therefore, I had to adopt a little 'bias', or 'slant' if you please, in deciding what to focus on and what to ignore. Julia is a technical computing language, although it does have the capabilities of any general purpose language and you'd be hard-pressed to find tasks it's completely unsuitable for (although that does not mean it's the best or easiest choice for any of them). Julia was developed with the occasional reference to R, and with an avowed intent to improve upon R's clunkiness. R is a great language, but relatively slow, to the point that most people use it to rapid prototype, then implement the algorithm for production in Python or Java. Julia seeks to be as approachable as R but without the speed penalty.

PyCall.jl - Package to call Python functions from the Julia language

  •    Julia

This package provides the ability to directly call and fully interoperate with Python from the Julia language. You can import arbitrary Python modules from Julia, call Python functions (with automatic conversion of types between Julia and Python), define Python classes from Julia methods, and share large data structures between Julia and Python without copying them. Within Julia, just use the package manager to run Pkg.add("PyCall") to install the files. Julia 0.5 or later is required.

julia-mit - Tutorials and information on the Julia language for MIT numerical-computation courses.

  •    

Several MIT courses involving numerical computation, including 18.06, 18.303, 18.330, 18.335/6.337, 18.337/6.338, and 18.338, are beginning to use Julia, a fairly new language for technical computing. This page is intended to supplement the Julia documentation with some simple tutorials on installing and using Julia targeted at MIT students. See also our Julia cheatsheet listing a few basic commands, as well as the Learn Julia in Y minutes tutorial page. In particular, we will be using Julia in the IJulia browser-based enviroment, which leverages your web browser and IPython to provide a rich environment combining code, graphics, formatted text, and even equations, with sophisticated plots via Matplotlib.

LightGraphs.jl - An optimized graphs package for Julia

  •    Julia

Until an issue with one of our dependencies is resolved, LightGraphs will not work with any Julia 0.7 or 1.0 version that has been built from source on OSX or other systems with a compiler more modern than GCC7. If you use LightGraphs with Julia 0.7 or 1.0, please download a Julia binary. LightGraphs offers both (a) a set of simple, concrete graph implementations -- Graph (for undirected graphs) and DiGraph (for directed graphs), and (b) an API for the development of more sophisticated graph implementations under the AbstractGraph type.

Cxx.jl - The Julia C++ Interface

  •    Julia

The Julia C++ Foreign Function Interface (FFI) and REPL. You will need to install Julia v0.6 (or later).

ParallelAccelerator

  •    Julia

ParallelAccelerator is a Julia package for speeding up compute-intensive Julia programs. In particular, Julia code that makes heavy use of high-level array operations is a good candidate for speeding up with ParallelAccelerator. With the @acc macro that ParallelAccelerator provides, users may specify parts of a program to accelerate. ParallelAccelerator compiles these parts of the program to fast native code. It automatically eliminates overheads such as array bounds checking when it is safe to do so. It also parallelizes and vectorizes many data-parallel operations.

julia-vim - Vim support for Julia.

  •    Vim

Julia support for Vim. The full documentation is available from Vim: after installation, you just need to type :help julia-vim.

Escher.jl - Composable Web UIs in Julia

  •    Julia

This package is beta quality and has a large surface area for bugs. Do not use it for anything important. A web server for 2016. Escher's built-in web server allows you to create interactive Julia UIs with very little code. It takes care of messaging between Julia and the browser under-the-hood. It can also hot-load code: you can see your UI evolve as you save your changes to it.

IJulia.jl - Julia kernel for Jupyter

  •    Julia

IJulia is a Julia-language backend combined with the Jupyter interactive environment (also used by IPython). This combination allows you to interact with the Julia language using Jupyter/IPython's powerful graphical notebook, which combines code, formatted text, math, and multimedia in a single document. to install IJulia.