For those not in the no (Tips and Tricks)

Post any examples or modules that you want to share here
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: For those not in the no (Tips and Tricks)

Post by tulamide »

And here's a Ruby version.
Attachments
Float to Decimal Place Converter [Ruby].fsm
(456 Bytes) Downloaded 1273 times
"There lies the dog buried" (German saying translated literally)
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: For those not in the no (Tips and Tricks)

Post by Spogg »

:lol:

So many ways to skin a cat!

But which one is best?

Cheers

Spogg
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: For those not in the no (Tips and Tricks)

Post by Spogg »

Here's a DSP version which can handle streams to make stepped waves...

ASM next, optimised...?

Cheers

Spogg
Attachments
Decimal places in DSP.fsm
(38.05 KiB) Downloaded 1258 times
User avatar
rocknrollkat
Posts: 213
Joined: Mon Jan 04, 2016 7:04 pm
Location: Oakland Gardens, New York City, U.S.A.
Contact:

Re: For those not in the no (Tips and Tricks)

Post by rocknrollkat »

Jan. 27, 2016
It's nice to see such interest in my little schematic !!
I was going to attempt a Ruby version, yours is really elegant, I will learn from your example.
Also the DSP and Format versions are terrific, thanks for the great input, everyone !!

Best,

ROXY :D
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: For those not in the no (Tips and Tricks)

Post by tulamide »

Here's something you will really like (and which is very unusual). In the Ruby version you can actually enter a negative value for the decimal places.

Example:
156.49

places 2 => 156.49
places 1 => 156.5
places 0 => 156
places -1 => 160
places -2 => 200

Isn't that cool? :o
"There lies the dog buried" (German saying translated literally)
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: For those not in the no (Tips and Tricks)

Post by martinvicanek »

Alright, here is an ASM rounder. It will also process a negative number of digits. However, it is prone to overflow.
ASM-Rounder.fsm
(1 KiB) Downloaded 1253 times
Why am I wasting my time like this? :lol:
User avatar
rocknrollkat
Posts: 213
Joined: Mon Jan 04, 2016 7:04 pm
Location: Oakland Gardens, New York City, U.S.A.
Contact:

Re: For those not in the no (Tips and Tricks)

Post by rocknrollkat »

Jan. 27, 22016
I just entered a negative number in my original version and had no problems,
the decimal places all came out negative.
Here's my original schematic again, with a negative number entered.

It's nice to see how much interest this is generating !
Keep in mind that I'm the new guy here, and I 'confuse' easily !!

ROXY ;)
Attachments
ROXY Float to Decimal Place Converter-NEGATIVE NUMBER no problem - 1-27-2016.fsm
(555 Bytes) Downloaded 1229 times
User avatar
rocknrollkat
Posts: 213
Joined: Mon Jan 04, 2016 7:04 pm
Location: Oakland Gardens, New York City, U.S.A.
Contact:

Re: For those not in the no (Tips and Tricks)

Post by rocknrollkat »

Jan. 28, 2016
Here's something I just discovered, purely by accident.
You can use readouts as summing points.
This may be old news to many of you, but for me, it's all brand new.
The first schematic adds three floats in the traditional manner.
The second schematic adds three floats using a float pane as the summing point, who knew ?
The third schematic uses a 'readout' pane to do the summing, this time you have to include the 'direct out' module to activate it.
Using Martin's CPU meter, there is no real advantage to doing it either way. but it sure helps in decluttering your schematic !

Enjoy !!

ROXY :)
Attachments
Three summing points.fsm
Add numbers three ways !!
(822 Bytes) Downloaded 1200 times
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: For those not in the no (Tips and Tricks)

Post by tulamide »

rocknrollkat wrote:Jan. 27, 22016
I just entered a negative number in my original version and had no problems,
the decimal places all came out negative.
Here's my original schematic again, with a negative number entered.

It's nice to see how much interest this is generating !
Keep in mind that I'm the new guy here, and I 'confuse' easily !!

ROXY ;)

My tip wasn't about negative numbers, but about a negative amount of decimals.
"There lies the dog buried" (German saying translated literally)
User avatar
rocknrollkat
Posts: 213
Joined: Mon Jan 04, 2016 7:04 pm
Location: Oakland Gardens, New York City, U.S.A.
Contact:

Re: For those not in the no (Tips and Tricks)

Post by rocknrollkat »

tulamide wrote:
rocknrollkat wrote:Jan. 27, 22016
I just entered a negative number in my original version and had no problems,
the decimal places all came out negative.
Here's my original schematic again, with a negative number entered.

It's nice to see how much interest this is generating !
Keep in mind that I'm the new guy here, and I 'confuse' easily !!

ROXY ;)

My tip wasn't about negative numbers, but about a negative amount of decimals.


tulamide, Like I said, I 'confuse' easily.
I don't 'get' negative amounts of decimals.
I'm trying to figure out how to show the proper amount of zeroes when arriving at 4.00 for example.
Flowstone ignores the zeroes, and that makes the decimal point jump, which is what I'm trying to prevent.
For example, 4.01 displays correctly, 4.00 just displays '4', no zeroes.

Best regards,

ROXY
Post Reply