{"id":15286672,"url":"https://github.com/fkastner/nicenumbers.jl","last_synced_at":"2025-05-07T03:47:22.497Z","repository":{"id":44574250,"uuid":"242509034","full_name":"fkastner/NiceNumbers.jl","owner":"fkastner","description":"The nicest numbers in Julia.","archived":false,"fork":false,"pushed_at":"2024-04-02T06:21:02.000Z","size":354,"stargazers_count":27,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T03:47:14.405Z","etag":null,"topics":["julia"],"latest_commit_sha":null,"homepage":"https://fkastner.github.io/NiceNumbers.jl/stable","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fkastner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-02-23T12:01:14.000Z","updated_at":"2024-07-08T01:51:47.000Z","dependencies_parsed_at":"2024-02-05T09:53:20.561Z","dependency_job_id":"215ba0bc-5eb9-48b9-b2b4-752a53470e74","html_url":"https://github.com/fkastner/NiceNumbers.jl","commit_stats":{"total_commits":68,"total_committers":3,"mean_commits":"22.666666666666668","dds":0.1470588235294118,"last_synced_commit":"ae17b8249fef05923c849106eb290782a0c9dfda"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkastner%2FNiceNumbers.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkastner%2FNiceNumbers.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkastner%2FNiceNumbers.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkastner%2FNiceNumbers.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fkastner","download_url":"https://codeload.github.com/fkastner/NiceNumbers.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810275,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["julia"],"created_at":"2024-09-30T15:18:10.582Z","updated_at":"2025-05-07T03:47:22.479Z","avatar_url":"https://github.com/fkastner.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NiceNumbers.jl\n*The nicest numbers in Julia*\n\n\u003c!-- [![Build Status](https://travis-ci.org/fkastner/NiceNumbers.jl.svg?branch=master)](https://travis-ci.org/fkastner/NiceNumbers.jl)\n[![Coverage Status](https://coveralls.io/repos/github/fkastner/NiceNumbers.jl/badge.svg?branch=master)](https://coveralls.io/github/fkastner/NiceNumbers.jl?branch=master)\n[![Docs stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://fkastner.github.io/NiceNumbers.jl/stable) --\u003e\n\n[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://fkastner.github.io/NiceNumbers.jl/stable)\n[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://fkastner.github.io/NiceNumbers.jl/dev)\n[![Build Status](https://github.com/fkastner/NiceNumbers.jl/workflows/CI/badge.svg)](https://github.com/fkastner/NiceNumbers.jl/actions)\n[![Coverage](https://coveralls.io/repos/github/fkastner/NiceNumbers.jl/badge.svg?branch=master)](https://coveralls.io/github/fkastner/NiceNumbers.jl?branch=master)\n\nThis package implements a number type to represent numbers you can safely give to\nyour students to work with.\n\nThe goal is that when common linear algebra or numerical algorithms work using `NiceNumber`s\nthat then one can be sure that the algorithm can be reasonably easy worked through by hand\nwith the given numbers.\n\nNice numbers as implemented in this package consist of a rational part and a square root part with\na rational coefficient. Thus every `NiceNumber` is specified using two `Rational{Int}`s and one `Int`.\n\n## Installation\n\nJust add the package from the Julia Pkg mode:\n```julia\njulia\u003e] add NiceNumbers\n```\n\n## Usage Example\n\n```julia\njulia\u003e using NiceNumbers\n\njulia\u003e n = NiceNumber(2,3,5)\nNice number:\n   2+3⋅√5\n\njulia\u003e n^2\nNice number:\n   49+12⋅√5\n\njulia\u003e m = NiceNumber(3//5)\nNice number:\n   3//5\n\njulia\u003e n+m, n-m, n*m, n/m\n(13//5+3⋅√5, 7//5+3⋅√5, 6//5+9//5⋅√5, 10//3+5⋅√5)\n\njulia\u003e sqrt(m)\nNice number:\n   1//5⋅√15\n\njulia\u003e sqrt(n)\nERROR: sqrt(2+3⋅√5) is not nice anymore!\n[...]\n```\n\nThere is also a macro to simplify working with nice numbers:\n```julia\njulia\u003e using LinearAlgebra\n\njulia\u003e n = norm([4,12,3] * √2)\n18.38477631085024\n\njulia\u003e @nice m = norm([4,12,3] * √2)\nNice number:\n   13⋅√2\n\njulia\u003e n == m\ntrue\n```\n\nFor further examples see the examples section of the documentation,\nespecially the [SVD example](https://fkastner.github.io/NiceNumbers.jl/dev/example_svd/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffkastner%2Fnicenumbers.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffkastner%2Fnicenumbers.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffkastner%2Fnicenumbers.jl/lists"}