Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arteymix/numeric-glib
Numeric data types for GLib via GCC extensions
https://github.com/arteymix/numeric-glib
128-bit 80-bit decimal gcc-extensions vala
Last synced: 20 days ago
JSON representation
Numeric data types for GLib via GCC extensions
- Host: GitHub
- URL: https://github.com/arteymix/numeric-glib
- Owner: arteymix
- License: lgpl-3.0
- Created: 2016-11-01T14:53:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-18T13:52:24.000Z (almost 5 years ago)
- Last Synced: 2024-11-01T03:32:29.221Z (2 months ago)
- Topics: 128-bit, 80-bit, decimal, gcc-extensions, vala
- Language: C
- Size: 91.8 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
- awesome-vala - Numeric-GLib - A collection of numeric data types for GLib (and Vala) via GCC extensions. It includes 128 bit integers & floats, complex types, vectorized operations, and decimal types. (Libraries / Data Structures & Data Types)
README
# Numeric-GLib
Numeric data types for GLib via GCC extensions
# Features
- 128 bit integers with `int128` and `uint128`
- `float80` and quad-precision `float128`
- decimal with `decimal32`, `decimal64` and `decimal128`
- C99 `complex`, `complex80` and `complex128`
- vectorized operations on supported types
- little and big endian variants with `_le` and `_be` suffixAll types are prefixed with `numeric_`, but can be used as-is by importing the
`Numeric` namespace in Vala.# Usage
In Vala, one can simply add `--pkg=numeric-glib-1.0` to include the type
definitions and link against the shared library to initialize all the types and
transformations.```bash
vala --pkg=numeric-glib-1.0 main.vala
```Or via Meson, the `numeric_glib` dependency can be included in any target.
```python
project('Foo')glib = dependency('glib-2.0')
gobject = dependency('gobject-2.0')
numeric_glib = dependency('numeric-glib-1.0', fallback: ['numeric-glib', 'numeric_glib_dep'])
numeric_glib_vala = dependency('numeric-glib-1.0', fallback: ['numeric-glib', 'numeric_glib_vala_dep'])executable('foo', 'foo.c', dependencies: [glib, gobject, numeric_glib])
executable('foo', 'foo.vala', dependencies: [glib, gobject, numeric_glib_vala])
```