sheetjs-clone/test/fraction.json
SheetJS 43f8f00ef5 version bump 0.4.0: improvements across the board
- Proper fraction handling (using frac.cont)
- Better handling of negative number cases
- More tests!
2013-12-26 17:35:42 -05:00

108 lines
4.0 KiB
JSON

[
[1, "# ?/?", "1 "],
[-1.2, "# ?/?", "-1 1/5"],
[12.3, "# ?/?", "12 1/3"],
[-12.34, "# ?/?", "-12 1/3"],
[123.45, "# ?/?", "123 4/9"],
[-123.456, "# ?/?", "-123 1/2"],
[1234.567, "# ?/?", "1234 4/7"],
[-1234.5678, "# ?/?", "-1234 4/7"],
[12345.6789, "# ?/?", "12345 2/3"],
[-12345.67891, "# ?/?", "-12345 2/3"],
[1, "# ??/??", "1 "],
[-1.2, "# ??/??", "-1 1/5 "],
[12.3, "# ??/??", "12 3/10"],
[-12.34, "# ??/??", "-12 17/50"],
[123.45, "# ??/??", "123 9/20"],
[-123.456, "# ??/??", "-123 26/57"],
[1234.567, "# ??/??", "1234 55/97"],
[-1234.5678, "# ??/??", "-1234 46/81"],
[12345.6789, "# ??/??", "12345 55/81"],
[-12345.67891, "# ??/??", "-12345 55/81"],
[1, "# ???/???", "1 "],
[-1.2, "# ???/???", "-1 1/5 "],
[12.3, "# ???/???", "12 3/10 "],
[-12.34, "# ???/???", "-12 17/50 "],
[123.45, "# ???/???", "123 9/20 "],
[-123.456, "# ???/???", "-123 57/125"],
[1234.567, "# ???/???", "1234 55/97 "],
[-1234.5678, "# ???/???", "-1234 67/118"],
[12345.6789, "# ???/???", "12345 74/109"],
[-12345.67891, "# ???/???", "-12345 573/844"],
[1, "# ?/2", "1 "],
[-1.2, "# ?/2", "-1 "],
[12.3, "# ?/2", "12 1/2"],
[-12.34, "# ?/2", "-12 1/2"],
[123.45, "# ?/2", "123 1/2"],
[-123.456, "# ?/2", "-123 1/2"],
[1234.567, "# ?/2", "1234 1/2"],
[-1234.5678, "# ?/2", "-1234 1/2"],
[12345.6789, "# ?/2", "12345 1/2"],
[-12345.67891, "# ?/2", "-12345 1/2"],
[1, "# ?/4", "1 "],
[-1.2, "# ?/4", "-1 1/4"],
[12.3, "# ?/4", "12 1/4"],
[-12.34, "# ?/4", "-12 1/4"],
[123.45, "# ?/4", "123 2/4"],
[-123.456, "# ?/4", "-123 2/4"],
[1234.567, "# ?/4", "1234 2/4"],
[-1234.5678, "# ?/4", "-1234 2/4"],
[12345.6789, "# ?/4", "12345 3/4"],
[-12345.67891, "# ?/4", "-12345 3/4"],
[1, "# ?/8", "1 "],
[-1.2, "# ?/8", "-1 2/8"],
[12.3, "# ?/8", "12 2/8"],
[-12.34, "# ?/8", "-12 3/8"],
[123.45, "# ?/8", "123 4/8"],
[-123.456, "# ?/8", "-123 4/8"],
[1234.567, "# ?/8", "1234 5/8"],
[-1234.5678, "# ?/8", "-1234 5/8"],
[12345.6789, "# ?/8", "12345 5/8"],
[-12345.67891, "# ?/8", "-12345 5/8"],
[1, "# ??/16", "1 "],
[-1.2, "# ??/16", "-1 3/16"],
[12.3, "# ??/16", "12 5/16"],
[-12.34, "# ??/16", "-12 5/16"],
[123.45, "# ??/16", "123 7/16"],
[-123.456, "# ??/16", "-123 7/16"],
[1234.567, "# ??/16", "1234 9/16"],
[-1234.5678, "# ??/16", "-1234 9/16"],
[12345.6789, "# ??/16", "12345 11/16"],
[-12345.67891, "# ??/16", "-12345 11/16"],
[1, "# ?/10", "1 "],
[-1.2, "# ?/10", "-1 2/10"],
[12.3, "# ?/10", "12 3/10"],
[-12.34, "# ?/10", "-12 3/10"],
[123.45, "# ?/10", "123 5/10"],
[-123.456, "# ?/10", "-123 5/10"],
[1234.567, "# ?/10", "1234 6/10"],
[-1234.5678, "# ?/10", "-1234 6/10"],
[12345.6789, "# ?/10", "12345 7/10"],
[-12345.67891, "# ?/10", "-12345 7/10"],
[1, "# ??/100", "1 "],
[-1.2, "# ??/100", "-1 20/100"],
[12.3, "# ??/100", "12 30/100"],
[-12.34, "# ??/100", "-12 34/100"],
[123.45, "# ??/100", "123 45/100"],
[-123.456, "# ??/100", "-123 46/100"],
[1234.567, "# ??/100", "1234 57/100"],
[-1234.5678, "# ??/100", "-1234 57/100"],
[12345.6789, "# ??/100", "12345 68/100"],
[-12345.67891, "# ??/100", "-12345 68/100"],
[0.3, "# ?/?", " 2/7"],
[1.3, "# ?/?", "1 1/3"],
[2.3, "# ?/?", "2 2/7"],
[0, "0", "0"]
]