Natural fractions

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

#1 Pubblicato: 21/10/2022 04:00:17
Юрий

Юрий

0 apprezzamenti in 1 post.

Gruppo: 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 Pubblicato: 21/10/2022 07:59:41
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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 Pubblicato: 21/10/2022 10:42:57
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 apprezzamenti in 181 post.

Gruppo: 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 Pubblicato: 21/10/2022 11:49:46
churichuro

churichuro

29 apprezzamenti in 79 post.

Gruppo: User

easy

2+1/2

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

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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 Pubblicato: 21/10/2022 12:15:46
Oscar Campo

Oscar Campo

135 apprezzamenti in 309 post.

Gruppo: 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,59 KiB) scaricato 1306 volta(e).
1 utenti hanno apprezzato questo post
Alvaro 24/10/2022 00:51:00
#7 Pubblicato: 22/10/2022 08:55:34
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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,14 KiB) scaricato 1361 volta(e).
#8 Pubblicato: 24/10/2022 21:55:59
Norm Schutzkus

Norm Schutzkus

9 apprezzamenti in 90 post.

Gruppo: 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,21 KiB) scaricato 1287 volta(e).
1 utenti hanno apprezzato questo post
Alvaro 25/10/2022 01:12:00
#9 Pubblicato: 25/10/2022 01:17:33
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: 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,21 KiB) scaricato 1287 volta(e).



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

Feet Inches and Fractions.sm (40,62 KiB) scaricato 1331 volta(e).
Feet Inches and Fractions.pdf (166,57 KiB) scaricato 915 volta(e).

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

Best regards.
Alvaro.
  • Nuovi post
  • Nessun nuovo post