arithmetic   809

« earlier    

GitHub - Spl1ce/Rational-Number-Class: This is a class that I made that is a plug and play version of a rational number library
GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
fraction  rational  number  maths  arithmetic  comparison  library  c  opensource  floss 
march 2018 by gilberto5757
What Every Computer Scientist Should Know About Floating-Point Arithmetic
This appendix is an edited reprint of the paper What Every Computer Scientist Should Know About Floating-Point Arithmetic, by David Goldberg, published in the March, 1991 issue of Computing Surveys. Copyright 1991, Association for Computing Machinery, Inc., reprinted by permission.
arithmetic  math  paper  programming 
january 2018 by jchris
Continued Fractions
I like con­tin­ued frac­tions for their elegance, their finite closure under a wider set of oper­a­tions than dec­imal expan­sion, and their most-sig­nif­icant-part-first arithmetic. But they run for unpre­dictable and pos­si­bly non-ter­minat­ing time before pro­vid­ing any informa­tion at all.
I pro­pose that a useful real-number rep­re­senta­tion would be equiv­a­lent to inter­vals that could be narrowed by applying a compu­ta­tion. Con­tin­ued frac­tions are such a narrow­ing inter­val: truncat­ing at an odd number of val­ues gives a lower bound, while truncat­ing at an even number gives an upper bound. The prob­lem is that not every answer gives such a narrow­ing inter­val because not all con­tin­ued frac­tions con­tin­ue. [1; 2, 2, …] is a narrow­ing inter­val, but [2], it’s square, must appear in an all-or-noth­ing way.
All of which begs the ques­tion, what rep­re­senta­tion should be used? It clearly will not be canon­ical, since we want to be able to rep­re­sent two as both an finite inte­ger and an infi­nitely-narrow­ing inter­val converg­ing on two. Beyond that, it isn’t clear. Some­thing to think about.
continued-fractions  algorithms  arithmetic  to-write-about  nudge-targets  consider:looking-to-see 
december 2017 by Vaguery
Arithmetic with Continued Fractions
Multiprecision arithmetic algorithms usually represent real numbers as decimals, or perhaps as their base-2n analogues. But this representation has some puzzling properties. For example, there is no exact representation of even as simple a number as one-third. Continued fractions are a practical but little-known alternative.

Continued fractions are a representation of the real numbers that are in many ways more mathematically natural than the usual decimal or binary representations. All rational numbers have simple representations, and so do many irrational numbers, such as sqrt(2) and e1. One reason that continued fractions are not often used, however, is that it's not clear how to involve them in basic operations like addition and multiplication. This was an unsolved problem until 1972, when Bill Gosper found practical algorithms for continued fraction arithmetic.

In this talk, I explain what continued fractions are and why they are interesting, how to represent them in computer programs, and how to calculate with them.
continued-fractions  arithmetic  nudge-targets  consider:looking-to-see  to-write-about 
december 2017 by Vaguery

« earlier    

related tags

!zsh  #  -  academia  access  after  algebra  algorithm  algorithms  alias  and  arbitrar-precision  architecture  arm  array  arrays  assoc  associative  authentication  awaymsgused  backquotes  bash  bc  before  bigint  binary  bit-tricks  bits  bitwise  blog  bonn  books  brace  breakfast  browserhosted  brucedawson  bytes  c  calculation  calculator  calculus  calendar  cereal  child  children  closure  closures  code  coding  coinduction  comic  command  comparison  compiler  compute  computer  computerscience  consider:looking-to-see  constructive  continued-fractions  continued  convnet  convolution  corps-fini  course  cs  daniel-lemire  data  date  day  decimal  deduction  deep-learning  dictionary  differential  dir  divide  division  double  economy  education  engineering-design  equations  ethereum  evaluator  expansion  expression  expressions  fair-mapping  fairness  file  filename  filesize  finite-field  fixedpoint  flags  float  floating-point  floating  floatingpoint  floss  formats  fractal  fraction  fw  generation  geometric  geometry  glob  globbing  go  golang  group  head  hexa  hexadecimal  heyting  history  in  increment  indexing  integer  interesting  is:repo  java  javascript  johnregehr  join  js  kids  lang:swift  languages  learning  library  line  linux  logarithm  logic  mac  manycore  math  mathematical-recreations  mathematics  maths  memory  mental-math  mental  merriam-webster  metrics  minimal  modification  modular  modulo  month  morning  multi-core  mw  natural  negative  notation  nudge-targets  number-theory  number  numbers  of  opensource  operation  operations  or  origins  other  overflow  paper  papers  parallelism  parameter  parentheses  parser  pattern  perfectoid  perpetual  peter  pfenning  point  pointer  posit  postgresql  presburger  primitive  probability  problem  process  processor  program  programming  project  proof  puzzle  puzzle24  python  qualcomm  qualifiers  quotes  rather-interesting  rational  read  reading  recursive  reduce  reference  removal  replacement  representations  research  reverse  rfw  roots  rosie  rounding  ruby  saturday  scala  scary  scholze  school  science  security  sequence  sh  shared  shell  signed-vs-unsigned  size  smbc  sorting  spaces  spirograph  split  splitting  stream  structures  subscript  subscripts  substitution  subtitution  subtract  swift  swiftlang  symlink  system  tail  tank  teach  technique  terms  testing  the  theory  time  tiny  tips  to-write-about  tolearn  tool  toolbox  toread  totry  tounderstand  trainer  tree  trick  tricks  tutorial  tutorials  unix  unum  user  variable  weak  web  webcomic  word-splitting  word  wordsplitting  xor  zero  zsh  | 

Copy this bookmark: