Coder Social home page Coder Social logo

adamwhitehat / mixedradixcalculator Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 2.0 190 KB

Creates a counting system of radixes such as base 12 or mixed radixes such as Minutes/Hours/Days/Years (60/60/24/365)

Home Page: http://www.csharpprogramming.tips/2015/10/mixed-radix-numeral-system-class-and.html

C# 100.00%
polynomials data-structures mixed-radixes math mathematics numeral number-theory

mixedradixcalculator's Introduction

MixedRadixCalculator - 52:7:24:60:60:1000

Screenshot

A numeral system (or system of numeration) is a writing system for expressing numbers.

The most familiar one is of course the decimal numeral system. This is a 10-base numbering system. Computers use a binary numeral system. The base is sometimes called the radix or scale. Not all numbering systems have just one base. Take for example, how we currently divide time: There are 60 seconds in a minute, 60 minutes in an hour, 24 hours in a day, and 365 days in a year. This is called a mixed radix numeral system, and one might express the above mixed radix system like: 365:24:60:60. I choose the left side to be the most significant side. This is merely a personal preference, and my MixedRadixSystem class supports displaying both alignments. Another feature lies in my RadixNumeral class. Each numeral, or place value, supports having its own dictionary of symbols

https://en.wikipedia.org/wiki/Mixed_radix . http://mathworld.wolfram.com/Base.html

My 'Mixed Radix Calculator' creates a counting system of radices (plural of radix), such as base 12 or mixed radices such as Minutes/Hours/Days/Years (60/60/24/365).

Uses: I haven't found a lot of use cases for it yet, but it is interesting. I originally built this because I wanted to experiment with numeral systems that uses increasing consecutive prime numbers for each radix, as well as experiment with some off-bases, such as base 3 or base 7.

In a single base, say base 7, then 'round numbers' with only one place value having a 1 and the rest having zeros, such as 1:0:0:0:0 (in base 7), such numbers are powers of 7, and ever other number except for the 1's place value is a multiple of 7.

A mixed radix numeral system can represent a polynomial, and possibly provide for a simpler way to visualize and reason about them.

Yet another possible use is to make a numeral system with a base that is larger than and co-prime to some other target number (say 256) to make a bijective map from every value in a byte to some other value exactly once by repeatedly adding the value of the co-prime, modulus 256. This can appear rather random (or sometimes not at all) but the mapping is easily determined given the co-prime. I have talked about this notion before on my blog https://csharpcodewhisperer.blogspot.com/search/label/Coprime

If you like this project you would probably like my project EquationFinder, it finds equations given constraints https://github.com/AdamWhiteHat/EquationFinder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.