fractions Questions

4

Solved

I'm currently puzzling over the response provided by the class method Float>>asFraction and its various forms. Here are a few examples: GNU Smalltalk 0.001 asFraction 1/1000 0.001 asExactFrac...
Traceable asked 18/2, 2021 at 1:47

4

Solved

I found a problem related to rational numbers. Two rational numbers are given and the task is to find the simplest rational number between them. For this problem, the simplicity of a rational num...

10

Solved

What I need to convert decimal to fractions. It is easy to convert to 10's feet. 1.5 => 15/10 This can do via this code: public class Rational { private int num, denom; public Rational(d...
Jobie asked 23/7, 2015 at 11:23

2

Solved

Now, floating and double-precision numbers, although they can approximate any sort of number (although the same could be said integers, floats are just more precise), they are represented as binary...
Vernal asked 22/7, 2014 at 21:52

2

Solved

What is best way to represent fractions in F#? Haskell and Racket have convinient way to represent ratios. Is there a data type in F# to represent ratios?
Porcine asked 17/3, 2011 at 2:54

2

When calculating a proportion (0 < x < 1) I am looking to convert that result x into it's nearest 1/r form, so that for example for x = 0.30 is converted into 1/3 whereas for x = 0.29 is ...
Odom asked 9/9, 2019 at 22:16

2

Solved

I've recently run into an issue where I got a segfault in MSVC where I wouldn't in GCC. After hours I realized that apparently my version of MSVC does not support the following syntax: double va...
Zolner asked 20/5, 2019 at 14:33

7

I have a list of fractions, such as: data = ['24/221 ', '25/221 ', '24/221 ', '25/221 ', '25/221 ', '30/221 ', '31/221 ', '31/221 ', '31/221 ', '31/221 ', '30/221 ', '30/221 ', '33/221 '] How wo...
Adult asked 26/8, 2010 at 19:5

11

Solved

Is there any controls available for star rating in ios ? So i can use that in UITableviewCell ?? I know there are some open open source controls like DYRating etc.. But iam not able to add it in ...
Ohaus asked 19/4, 2013 at 8:25

2

Solved

I want to display double value as fraction in C#, how can I do this ? Thanks
Three asked 27/9, 2011 at 6:11

2

I'm trying to implement the simplex method in Python so I need to use the Gaussian elimination on arrays. Very often fractions come up and for more clarity and precision I would like to keep the fr...
Glyptic asked 3/3, 2017 at 11:34

13

Solved

In C++, When I calculate 2/3, it will output decimal values, how can I just get the original format (i.e.g 2/3) instead of 0.66666667 Thanks
Monaco asked 27/1, 2011 at 16:35

3

Solved

I am aware of the nature of floating point math but I still find the following surprising: from fractions import Fraction print(Fraction(0.2)) # -> 3602879701896397/18014398509481984 print(Fra...
Kalakalaazar asked 9/2, 2018 at 13:34

2

Solved

I'm trying to do some analysis over a simple Fraction class and I want some data to compare that type with doubles. The problem Right know I'm looking for some good way to get the density of Frac...
Plumage asked 13/1, 2018 at 23:31

2

I'm working on a harmonic ratio program and part of what I want a user to be able to do is plug in various ratios and have the decimal-valued frequency that's playing show you more ratio-locked fre...
Tetracaine asked 25/9, 2017 at 22:36

3

Solved

I've been using Python to calculate math equations. For example: from sympy import Symbol, Derivative, Integral x = Symbol('x') d = Symbol('d') Integral(8*x**(6/5)-7*x**(3/2),x).doit() Which res...
Lakieshalakin asked 12/8, 2017 at 13:49

2

Can anyone explain ULP Unit of least precision? I have the following definition, but it is still not clear "The size of the error when representing fractions is proportional to the size of the n...
Mattingly asked 14/5, 2017 at 14:57

1

Solved

I compute the reverse of matrix A, for instance, import numpy as np A = np.diag([1, 2, 3]) A_inv = np.linalg.pinv(A) print(A_inv) I got, [[ 1. 0. 0. ] [ 0. 0.5 0. ] [ 0. 0. 0.33333333]] B...
Teplica asked 13/2, 2017 at 16:53

2

Solved

What is the difference is between the Floating and Fractional classes in Haskell?
Limpid asked 31/1, 2017 at 17:50

2

Solved

I have a text file of numerical data, with headers, where some numbers are entered as fractions, some are entered as integers, and some are entered as floats, e.g.: col1name, col2name, col3name, c...
Indubitability asked 11/10, 2016 at 18:14

2

Solved

While doing exercise on the topic of float type to Fraction type conversion in Python 3.52, I found the difference between the two different ways of conversion. The first method is: >>> fr...
Eaddy asked 3/7, 2016 at 16:58

4

Solved

The ancient Egyptians only used fractions of the form 1/n so any other fraction had to be represented as a sum of such unit fractions and, furthermore, all the unit fractions were different! What...
Button asked 20/3, 2011 at 5:49

3

I'm having great difficulty with the following that I need to do for an assign: a. Declare a data structure that contains a rational number. b. Write f'xns that will +, -, *, / rational numbers. Al...
Intellectualism asked 24/11, 2015 at 7:14

3

Solved

Is there a simple method to (attempt to) rationalize all numeric values in an expression within a given delta, much like Rationalize[] in Mathematica? An example in Mathematica: In[25]:= Rational...
Barabarabarabas asked 8/10, 2012 at 3:3

2

Solved

So I'm learning that Lisp does fractions which is great. But why then does this equality check return NIL: * (= 0.2 1/5) NIL ...while it returns True if it's converted to float first: * (= 0...
Titania asked 1/10, 2015 at 14:3

© 2022 - 2024 — McMap. All rights reserved.