Rank: Newbie
Groups: Registered
Joined: 10/12/2021(UTC) Posts: 6 Was thanked: 1 time(s) in 1 post(s)
|
Is there any way to present division on the same line and not as a fraction? For example in Mathcad:
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,639 Location: Italy Was thanked: 1323 time(s) in 873 post(s)
|
If you don't need strictly a division symbol, you can use a multiplication |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 11/01/2018(UTC) Posts: 131 Location: Wisconsin Was thanked: 58 time(s) in 37 post(s)
|
Greetings! Originally Posted by: chito ...division on the same line... It is possible to combine Davide's and Jean's solutions, but you need to pull off a few tricks: 1) Create a custom function with (1) parameter 2) Use the special inline division character 「÷」 3) Declare your custom function as a 'unit' (this suppress the multiplication operation from displaying) To create the custom function with the inline division character, copy and paste the following into your SMath Worksheet: To utilize it, type in your numerator and multiply it by the custom function, where you pass the denominator into the function as the parameter. EXAMPLE: solving for 6/2; copy and past e the following (NOTE: since I am declaring the custom function as a unit; you must include ' when calling the custom function): -Kenny Lemens, P.E. Edited by user 17 June 2022 21:38:17(UTC)
| Reason: Spelling Errors (Noted in Orange) |
|
3 users thanked Kenny Lemens for this useful post.
|
on 17/06/2022(UTC), on 20/06/2022(UTC), on 21/06/2022(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 11/01/2018(UTC) Posts: 131 Location: Wisconsin Was thanked: 58 time(s) in 37 post(s)
|
Greetings, If you just need the statement to be on the same line and you want to avoid the use of exponents and custom functions, there is a native solution: Use the function str2num(▮) and type your statement as a string: You do have the ability to reference variables, but the use of whitespace (tab, space, newline, etc.) will corrupt the string and str2num(▮) will throw an error. Thus this statement will work: str2num( "(2+22)/4")=6 But this statement will throw a 'not defined' error: str2num( "(2 + 22) / 4")=▮ Its a good day to be alive; -Kenny Lemens, P.E. |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,124 Was thanked: 506 time(s) in 337 post(s)
|
In addition to Kenny you can remove white spaces. Furthermore, you can define a nameless function with Ctrl+Shift+K. It won't show a function before it, though it is a function. By that your statement shall look as a "normal" calculation. Regards str2num.sm (3kb) downloaded 3 time(s).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Originally Posted by: chito Is there any way to present division on the same line and not as a fraction ? Answer is NO, Smath does not have native ÷ operator More productive from infix algo style utilities, for infinite in-situ command line. infix Divide.sm (4kb) downloaded 5 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,124 Was thanked: 506 time(s) in 337 post(s)
|
Answer is YES, there are multiple ways demonstrated above. Choose what suits you most.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.