Natural fractions

Natural fractions - How can I enter a value to display the integer and fractional part - Messages

#1 Posted: 10/21/2022 4:00:17 AM
Юрий

Юрий

0 likes in 1 posts.

Group: User

Natural fractions. How can I enter a value to display the integer and fractional part, like 2½. Maybe somewhere there is a full-fledged Help?
#2 Posted: 10/21/2022 7:59:41 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Natural fractions.
How can I enter a value to display the integer and fractional part, like 2½.


... Maybe like this

Mantissa.PNG

#3 Posted: 10/21/2022 10:42:57 AM
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

74 likes in 164 posts.

Group: User

Greetings!

I understand your question, but such a feature isn't built into SMath. However, there are ways to mitigate this lack of support.

If you wish for special characters (e.g., 「½」) to be treated as a number, you can declare then as such:
  
½:0.5

      There are a few of these fraction characters you can define as a variable:
            SMATH_Fractions.jpg


If you wish to type a fraction in as you propose (2½ ), this isn't so easy. You can use a matrix and then add the values together (i.e., Σ[2 ½]). This reads kinda like a fraction, but is needlessly bulky:
  
sum(mat(2,½,1,2))



If the goal is to have the result of 2.5 itself to report as 2½ instead of 5/2; there isn't much you can do. The one thing you can do is create a function that will convert your number and report that fraction as type "string"


Hope this helps!
Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#4 Posted: 10/21/2022 11:49:46 AM
churichuro

churichuro

28 likes in 79 posts.

Group: User

easy

2+1/2

#5 Posted: 10/21/2022 11:57:51 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Natural fractions.
How can I enter a value to display the integer and fractional part


... make it algo style utility.

AlgoStyle.PNG

#6 Posted: 10/21/2022 12:15:46 PM
Oscar Campo

Oscar Campo

124 likes in 298 posts.

Group: Moderator

Wrote

Natural fractions. How can I enter a value to display the integer and fractional part, like 2½. Maybe somewhere there is a full-fledged Help?



Maybe this can help:
dec2frac.png

dec2frac.sm (6 KiB) downloaded 37 time(s).
1 users liked this post
Alvaro Diaz Falconi 10/24/2022 12:51:00 AM
#7 Posted: 10/22/2022 8:55:34 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Natural fractions.
How can I enter a value to display the integer and fractional part


... lat brick in the wall from not acknowledged.

Stuff Forum.sm (12 KiB) downloaded 32 time(s).
#8 Posted: 10/24/2022 9:55:59 PM
Norm Schutzkus

Norm Schutzkus

9 likes in 90 posts.

Group: User

"dec2frac(decimal)" Works for me! Thank you! I've been using a sheet from MathCad, which is not as clear:
Feet Inches and Fractions.sm (38 KiB) downloaded 34 time(s).
1 users liked this post
Alvaro Diaz Falconi 10/25/2022 1:12:00 AM
#9 Posted: 10/25/2022 1:17:33 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

"dec2frac(decimal)" Works for me! Thank you! I've been using a sheet from MathCad, which is not as clear:
Feet Inches and Fractions.sm (38 KiB) downloaded 34 time(s).



Even the Oscar's solution is very elegant, this is another approach, based on the Nasch work.

Feet Inches and Fractions.sm (40 KiB) downloaded 37 time(s).
Feet Inches and Fractions.pdf (166 KiB) downloaded 46 time(s).

As an application, using a vernier (the English version here, but without the students comments)

Best regards.
Alvaro.
  • New Posts New Posts
  • No New Posts No New Posts