SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: joecar on November 07, 2025, 07:23:29 PM

Title: v30 calculator
Post by: joecar on November 07, 2025, 07:23:29 PM
Is there a way to revert the v30 calculator back to previous (i.e. no scientific functions, no conversions), i.e. like a setting or a button (one for scientific functions, another for conversions)...?

Also, if you really want to do conversions (proverbial can of worms):
- kilometer is mentioned, but mile, nautical mile and league are not mentioned.
- rod/pole, chain, furlong, fathom are not mentioned.
- in addition to tonne, note that ton has two variants, long and short.
- area is not mentioned (hectare, acre, square mile, rood, perch).
- gallon has two variants, US and Imperial.

 :D ;D

Title: Re: v30 calculator
Post by: joecar on November 07, 2025, 07:25:00 PM
( can remove "(Hex)" since everyone knows what 0x1234 means )
Title: Re: v30 calculator
Post by: joecar on November 07, 2025, 07:32:40 PM
trigonometric and hyperbolic functions: do these take arguments in degrees or radians...?

suggestion:
they should take arguments in radians, and could have a degree ° button to specify degree->radian conversion, e.g. sin(90°)

i.e. so executing 90° would produce 1.5708 radians.


And there is no pi or e constants (if you're doing trig/hyp you will need these).

Title: Re: v30 calculator
Post by: Dan on November 07, 2025, 07:38:04 PM
( can remove "(Hex)" since everyone knows what 0x1234 means )

I can never remember how to convert a metric ton.
Title: Re: v30 calculator
Post by: joecar on November 07, 2025, 07:41:45 PM
scientific calculator also require factorial ! operator, and C(n,r) and P(n,r) functions.
Title: Re: v30 calculator
Post by: joecar on November 07, 2025, 07:42:35 PM
can of worms continues:

will the scientifc calculator support complex numbers...?  :)
Title: Re: v30 calculator
Post by: joecar on November 07, 2025, 07:49:11 PM
Code: [Select]
-19 % 7   = -5 = 0xFFFB (16 bit)
is fine, but what if some other word width was wanted, e.g. 8 bits or 32 bits...?
Title: Re: v30 calculator
Post by: joecar on November 07, 2025, 07:52:35 PM
superscript checkbox is confusing...

it looks like it does power:
Code: [Select]
5³= 125
125
5**3= 125 = 0x7D (Hex)
125
Title: Re: v30 calculator
Post by: Clark on November 07, 2025, 09:15:54 PM
Thanks for the suggestions.

We will continue to add features to the calculator.

An option whether to add " (Hex)" would be useful.

More unit types

Functions like sin needs to support radians and degrees


I like typing equations in the editor and using variables. Very convenient for some simple math that I don't have an app for.

Title: Re: v30 calculator
Post by: Clark on November 07, 2025, 10:56:03 PM
No docs for π and the calculator doesn't have a button for it but π is supported. It would be handy if "pi" worked too. Right now, only π is supported. No support for "e" yet.
Title: Re: v30 calculator
Post by: joecar on November 11, 2025, 01:08:20 AM
No docs for π and the calculator doesn't have a button for it but π is supported. It would be handy if "pi" worked too. Right now, only π is supported. No support for "e" yet.
Not sure what you mean by n.

 :)
Title: Re: v30 calculator
Post by: joecar on November 11, 2025, 01:20:08 AM
Functions like sin needs to support radians and degrees
sometimes there are mixed radix calculations, e.g.  sin(90°)*cos(pi)
and a pi symbol button would be nice  :)

Quote
I like typing equations in the editor and using variables. Very convenient for some simple math that I don't have an app for.
Copy/Paste of equations is very handy  :)
Variables are required, with multi letter names (i.e. not a single letter name).
Title: Re: v30 calculator
Post by: Clark on November 11, 2025, 01:44:08 AM
We will be adding quite a few calculator additions to v30.0.1 (like better support for degrees, more unit support etc.).

Buttons for some unicode stuff would be handy

Thanks again for more suggestions   
Title: Re: v30 calculator
Post by: joecar on November 13, 2025, 08:21:18 PM
You are welcome.

I have a few more suggestions that I am thinking thru and trying out on various calculators.
Title: Re: v30 calculator
Post by: Clark on November 13, 2025, 09:12:49 PM
Have you tried typing something like:

Code: [Select]
25*123=


in a .txt file? With the default options, the result is copied to the clipboard. You can turn this feature ON for source files too and limit it to when you're in comments.

Tools>Math>When Type '=' Copy Result to Clipboard

I did find some issues where certain binary operations with unit types should display an error but currently gives a result which doesn't make sense. We will eventually post a hot fix for this.
Title: Re: v30 calculator
Post by: joecar on November 14, 2025, 08:13:58 PM
can't post screenshot...!?!?!?

I don't see this:
Code: [Select]
Tools>Math>When Type '=' Copy Result to Clipboard

I see this:
Code: [Select]
Tools>Math>When Type '=' number of lines before current line to scan for variables

SlickEdit Pro 2025 (v30.0.0.0 64-bit Qt5)

Title: Re: v30 calculator
Post by: Clark on November 14, 2025, 08:54:09 PM
Not sure what's going on.

Try a default config:

Code: [Select]
vs +new -sc c:\temp\newconfig
Title: Re: v30 calculator
Post by: joecar on November 15, 2025, 04:19:19 AM
Not sure what's going on.

Try a default config:
Code: [Select]
vs +new -sc c:\temp\newconfig

I did that ^ and I see the same as my previous post.
Title: Re: v30 calculator
Post by: Clark on November 15, 2025, 01:48:46 PM
Here's what I get with a default config on Windows.
Title: Re: v30 calculator
Post by: joecar on November 18, 2025, 04:39:22 PM
Here's what I get with a default config on Windows.
If there's a screenshot in your post, I don't see it.
Title: Re: v30 calculator
Post by: Clark on November 18, 2025, 05:22:54 PM
There is a screen shot. I guess it can't be seen by anyone but me.

It's a picture of the Tools>Math submenu. Do you have a Math submenu under the Tools menu? What items are displayed there?

Here's the Slick-C code for the Math submenu items:
Code: [Select]
         "Update All Results","math_update_all","","help math menu","Updates all math results in current file";
         "Update Results in Selection","math_update_in_selection","","help math menu","Updates math results in selection";
         "Update Results from Cursor","math_update_from_cursor","","help math menu","Updates math results starting from the cursor and continuing for the rest of the file";
         "Update Result for Current Line","math_update_current_line","","help math menu","Update math result for equation ('=') before cursor. Uses equation ('=') after cursor is used if not found.";
         "-","","","","";
         "Update Results While Typing","math_while_typing_toggle","","help math menu","Toggles updating math results while typing";
         "-","","","","";
         "When Type '=' Insert Result","math_on_equal_insert_result_toggle","","help math menu","Toggles inserting math results when '=' is typed";
         "When Type '=' Copy Result to Clipboard","math_on_equal_copy_to_clipboard_toggle","","help math menu","Toggles copying math result to clipboard when '=' is typed";
         "When Type '=' Show Errors","math_on_equal_show_errors_toggle","","help math menu","Toggles showing line error markers when '=' is typed";
         "-","","","","";
         "Color Variables","math_color_variables_toggle","","help math menu","Toggles whether variables are colored";
         "Color Results","math_color_results_toggle","","help math menu","Toggles whether results are colored";
         "Append Variable Results (=>result)","math_append_var_results_toggle","","help math menu","Toggles appending variables results for variables assigned a non-constant expression";
         "Implied Multiply (3y)","math_implied_multiply_toggle","","help math menu","Toggles implied multiply. When on, 3y is intepreted as 3*y. This option greatly slows down computation";
         "Math in Comments","math_in_comments_toggle","","help math menu","Toggles math in comments. Restrict math operations to comments.";
Title: Re: v30 calculator
Post by: joecar on November 18, 2025, 06:53:08 PM
Under the Tools->Math I see that submenu.
Title: Re: v30 calculator
Post by: Clark on November 18, 2025, 11:00:26 PM
Put the following in a .txt file

Code: [Select]
SilverOunces=10 troy ounces + 1000 grams
SilverCost= $300 + $1000
SilverCost/SilverOunces=

SilverSpotPrice=$50/troy ounce

SilverValue=SilverOunces * SilverSpotPrice
SilverProfit=SilverValue - SilverCost
SilverPercentProfit=(SilverValue-SilverCost)/SilverCost

Then turn on Tools>Math>"Update Results While Typing" or run "Tools>Math>Update All Results"

Very convenient if you want to put some math equations in a file.
Title: Re: v30 calculator
Post by: joecar on November 19, 2025, 12:10:53 AM
I see, very convenient... ;) ;) ...Thanks.