Welcome to Laser Pointer Forums! If you are looking for a laser you may want to check out the database of laser pointer companies. The link will open in a new window for your convenience.

 Laser Pointer Forums - Discuss Laser Pointers Looking for a special equation... Laser Pointer Company Database     Laser Top Sites List     Lasers by Type     Green Lasers

11-02-2010, 01:01 AM #17
 Class 3B Laser Join Date: Feb 2008 Location: Lincoln, NE Posts: 2,991 Rep Power: 216
Meatball
Class 3B Laser

Join Date: Feb 2008
Location: Lincoln, NE
Posts: 2,991
Rep Power: 216
Re: Looking for a special equation...

A piecewise function would be best IMO, but depending on the domain you're wanting to work with, it could be one heck of one function to write out. Not much use on a calculator consequently.

I thought about modifying Newton's method a bit, in order to find y values that aren't zeros, but then I ran into taking limits of derivatives of functions that I don't even have yet.

I gotta take a nap now. Thanks guys.

__________________
FIAT LUX

(\__/)
(='.'=)
(")_(")

11-02-2010, 03:26 AM #18
 Class 2M Laser Join Date: Feb 2009 Location: Shepherdstown, WV Posts: 505 Rep Power: 18
pianoman2011
Class 2M Laser

Join Date: Feb 2009
Location: Shepherdstown, WV
Posts: 505
Rep Power: 18
Re: Looking for a special equation...

Quote:
 Cool story bro, I've taken calculus at the collegiate level too. More of it at a higher level. And I'm sure a whole lot people here have more and higher-level calculus under their belt than I do. Perhaps your problem is that you focus on showboating rather than on your studies. -Trevor
I don't see what your problem is. I wasn't showboating, I was just letting you know that I'm not a complete idiot, because that's how you made me seem when you first responded to me. I'm not doing this for an assignment. I'm not doing this to show off any knowledge. Quite the contrary... I posed a question because I didn't know the answer. So maybe you can vent and pick on people somewhere else. Honestly IDGAF if you've taken calc at a "collegiate level", cause that collegiate-level knowledge isn't helping to answer my question one bit.

Quote:
 if you don't want to use custom functions, then... can limits be used? can a piecewise function be used?
A limit function would be fine, I'm pretty sure those could go into my calculator. I've just been wrapping my head around this recently and I can't come up with anything! :X
Quote:
 I'm still wondering what is so hard abt the > than 5 rule....... I'm no rocket scientist......I didn't fail math or programming languages either. I'm at a quandary why to have it calculate the number when you can plug it in already rounded in your head or round the result in your head This is like the "duh" factor.............am I missing something? Edit: Ok, do you realize the error factor when rounding via multiple times and used in an equation.......? My last post here.......he's gotten responses in 4 formats.......enough is enough. I may need to call the Troll Overlord in on this............lmao
The point of knowing the answer to this question isn't to be able to figure out how to round numbers... it's more of a "how can I mathematically do that" kinda' thing. And I'd love you to call in TJ if he's good at math!

Quote:
 A piecewise function would be best IMO, but depending on the domain you're wanting to work with, it could be one heck of one function to write out. Not much use on a calculator consequently. I thought about modifying Newton's method a bit, in order to find y values that aren't zeros, but then I ran into taking limits of derivatives of functions that I don't even have yet. I gotta take a nap now. Thanks guys.
Thanks for the info. I think I'll look up what a piecewise function is and try to figure some stuff out. Maybe I'll be able to figure something out.

-Jakob
__________________
Functional Lasers

 405nm 12x Diode: 400mA: Jayrob Keychain CR2 Host: 505mW
 405nm SF-AW210 Diode: 240mA: Jayrob 4171 Flashlight Host: 210-220mW
 445nm XJ-A140 Diode: 280mA: Dorcy Junior Host: 200mW
 445nm XJ-A140 Diode: 1500mA: Hotlights 18650 Host: 1600mW
 473nm Oceanus 5mW RPL Style: <5mW
 532nm Rayfoss 200mW Adjustable Focus Pointer: 150-190mW
 532nm BudgetGadget 50mW Keychain Pointer: 60mW
 532nm DX 5mW Pointer: 8mW
 543nm Coherent 0.5mW HeNe Laser: 1mW
 593.5nm CNI Rigel Pen-Style Pointer: <5mW
 650nm LPC-815 Diode: 380mA: [COLOR=white][FONT=Verdana]FT-NS-3AAA TaskForce Flashlight Host: [COLOR=red]200-220mW

11-02-2010, 03:34 AM #19
 Class 3B Laser Join Date: Jul 2009 Location: Boulder, CO Posts: 4,467 Rep Power: 842
Trevor
Class 3B Laser

Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,467
Rep Power: 842
Re: Looking for a special equation...

Quote:
 Originally Posted by pianoman2011 I'm in calculus, way above rounding numbers...
Quote:
 Originally Posted by pianoman2011 Nopeeeee college calculus at my local college!
If that's not showboating, I don't know what is. It just appears you have something to prove.

f(x) = ( x + 0.5 ) - ( ( x + 0.5 ) % 1 );

...but if you could do that you'd probably have round(); anyway.

-Trevor
__________________
There's a fundamental truth to our nature. Man must explore.

Code:
```23:10 <ARG>    nothing has blown up yet :)
23:10 <Trevor> that is a distressingly low standard for success```

11-02-2010, 03:44 AM #20
 Class 2M Laser Join Date: Feb 2009 Location: Shepherdstown, WV Posts: 505 Rep Power: 18
pianoman2011
Class 2M Laser

Join Date: Feb 2009
Location: Shepherdstown, WV
Posts: 505
Rep Power: 18
Re: Looking for a special equation...

Quote:
 If that's not showboating, I don't know what is. It just appears you have something to prove. f(x) = ( x + 0.5 ) - ( ( x + 0.5 ) % 1 ); ...but if you could do that you'd probably have round(); anyway. -Trevor
When I look at those quotes, it does look a little showboaty. The first one was just to say that my question had nothing to do with any of my homework assignments. The second one was just to let you know that I'm not in highschool calc

That equation you posted up there looks like it has a lot of potential to be the one I'm looking for. I think if I throw in an "abs()" or two I might find my answer. Thanks!

-Jakob

Edit: I actually take back what I said about abs(). I think I need to turn that into a step function somehow. Bringing me back to the math class I took a few years ago... time to dig through my notes on step-functions!
__________________
Functional Lasers

 405nm 12x Diode: 400mA: Jayrob Keychain CR2 Host: 505mW
 405nm SF-AW210 Diode: 240mA: Jayrob 4171 Flashlight Host: 210-220mW
 445nm XJ-A140 Diode: 280mA: Dorcy Junior Host: 200mW
 445nm XJ-A140 Diode: 1500mA: Hotlights 18650 Host: 1600mW
 473nm Oceanus 5mW RPL Style: <5mW
 532nm Rayfoss 200mW Adjustable Focus Pointer: 150-190mW
 532nm BudgetGadget 50mW Keychain Pointer: 60mW
 532nm DX 5mW Pointer: 8mW
 543nm Coherent 0.5mW HeNe Laser: 1mW
 593.5nm CNI Rigel Pen-Style Pointer: <5mW
 650nm LPC-815 Diode: 380mA: [COLOR=white][FONT=Verdana]FT-NS-3AAA TaskForce Flashlight Host: [COLOR=red]200-220mW

Last edited by pianoman2011; 11-02-2010 at 03:48 AM.

11-02-2010, 03:49 AM #21
 Class 3B Laser Join Date: Jul 2009 Location: Boulder, CO Posts: 4,467 Rep Power: 842
Trevor
Class 3B Laser

Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,467
Rep Power: 842
Re: Looking for a special equation...

f(x) = ( |x| / x ) * ( ( |x| + 0.5 ) - ( ( |x| + 0.5 ) % 1 ) );

May not be optimal (speaking in CPU cycles), but that should do it.

-Trevor
__________________
There's a fundamental truth to our nature. Man must explore.

Code:
```23:10 <ARG>    nothing has blown up yet :)
23:10 <Trevor> that is a distressingly low standard for success```

11-02-2010, 03:49 AM #22
 Class 3R Laser Join Date: Apr 2008 Location: South Florida Posts: 1,544 Rep Power: 134
Jimmymcjimthejim
Class 3R Laser

Join Date: Apr 2008
Location: South Florida
Posts: 1,544
Rep Power: 134
Re: Looking for a special equation...

Quote:
 Originally Posted by twhite828 If that's not showboating, I don't know what is. It just appears you have something to prove.
I don't enjoy making posts like this, but seriously Trevor, ever since you entered this thread you've adopted an arrogance within your posts. The posts you quoted are only responses to your vulgar assumptions, and the fact that a student is curious enough to expand his knowledge of calculus is a blessing. Take it somewhere else man.
__________________
Current Lasers:
8??nm: 1050mA DIY Micro Sized
658nm: 2mW keychain pointer - DIY 80mA/350mA switchable in Altoids tin - 300mA DIY Micro Sized
632.8nm: 10mW Hughes HeNe - 15mW Melles Griot HeNe - 1mW Melles Griot bare tube
612nm: 5mW Meredith Instruments HeNe
594.1nm: 4mW Meredith Instruments HeNe
543nm: 2mW Melles Griot HeNe - <1mW Multimode 6" HeNe (He's cute!)
532nm: 5mW Lyra-G5 - 70mW DIY by Wannaburn
473nm: 5mW Lab Style
445nm: DIY 650mA in Sonar II Host
405nm: DIY LG 10X at 330mA with Ehgemus host and Microboost - CNI GLP-405 70mW

11-02-2010, 04:00 AM #23
 Class 3B Laser Join Date: Jul 2009 Location: Boulder, CO Posts: 4,467 Rep Power: 842
Trevor
Class 3B Laser

Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,467
Rep Power: 842
Re: Looking for a special equation...

Quote:
 Originally Posted by Jimmymcjimthejim I don't enjoy making posts like this, but seriously Trevor, ever since you entered this thread you've adopted an arrogance within your posts. The posts you quoted are only responses to your vulgar assumptions, and the fact that a student is curious enough to expand his knowledge of calculus is a blessing. Take it somewhere else man.
A question such as this one is oddly specific and screamed "homework problem" to me... therefore I wasn't going to be particularly kind. I was proven incorrect. Forgive the assumption.

*avoids making comment about how rounding isn't calculus and attempts to leave quietly*

-Trevor
__________________
There's a fundamental truth to our nature. Man must explore.

Code:
```23:10 <ARG>    nothing has blown up yet :)
23:10 <Trevor> that is a distressingly low standard for success```

11-02-2010, 04:04 AM #24
 Class 2M Laser Join Date: Feb 2009 Location: Shepherdstown, WV Posts: 505 Rep Power: 18
pianoman2011
Class 2M Laser

Join Date: Feb 2009
Location: Shepherdstown, WV
Posts: 505
Rep Power: 18
Re: Looking for a special equation...

Quote:
 f(x) = ( |x| / x ) * ( ( |x| + 0.5 ) - ( ( |x| + 0.5 ) % 1 ) ); May not be optimal (speaking in CPU cycles), but that should do it. Also, just busting your balls... don't worry about it. -Trevor
Thanks man, not worrying anymore :P

So I tried your equation with x=3.55

f(x) = (|x|/x)*((|x|+0.5)-((|x|+0.5)%1))
I'm assuming ^ means times .01
f(3.55) = (3.55/3.55)*(3.55+0.5)-((3.55+.5)*.01)

f(3.55) = 1*4.05-(4.05*.01)

f(3.55) = 4.05-.0405

f(3.55) = 4.0095

It came close to 4! But not quite... Trying to figure out what didn't work there.

Quote:
 I don't enjoy making posts like this, but seriously Trevor, ever since you entered this thread you've adopted an arrogance within your posts. The posts you quoted are only responses to your vulgar assumptions, and the fact that a student is curious enough to expand his knowledge of calculus is a blessing. Take it somewhere else man.
Thanks for defending me jimmy, I do believe me and Trevor are now ok I just hope my question doesn't turn into one big fight

-Jakob
__________________
Functional Lasers

 405nm 12x Diode: 400mA: Jayrob Keychain CR2 Host: 505mW
 405nm SF-AW210 Diode: 240mA: Jayrob 4171 Flashlight Host: 210-220mW
 445nm XJ-A140 Diode: 280mA: Dorcy Junior Host: 200mW
 445nm XJ-A140 Diode: 1500mA: Hotlights 18650 Host: 1600mW
 473nm Oceanus 5mW RPL Style: <5mW
 532nm Rayfoss 200mW Adjustable Focus Pointer: 150-190mW
 532nm BudgetGadget 50mW Keychain Pointer: 60mW
 532nm DX 5mW Pointer: 8mW
 543nm Coherent 0.5mW HeNe Laser: 1mW
 593.5nm CNI Rigel Pen-Style Pointer: <5mW
 650nm LPC-815 Diode: 380mA: [COLOR=white][FONT=Verdana]FT-NS-3AAA TaskForce Flashlight Host: [COLOR=red]200-220mW

11-02-2010, 04:05 AM #25
 Class 2M Laser Join Date: Feb 2009 Location: Shepherdstown, WV Posts: 505 Rep Power: 18
pianoman2011
Class 2M Laser

Join Date: Feb 2009
Location: Shepherdstown, WV
Posts: 505
Rep Power: 18
Re: Looking for a special equation...

Quote:
 A question such as this one is oddly specific and screamed "homework problem" to me... therefore I wasn't going to be particularly kind. I was proven incorrect. Forgive the assumption. *avoids making comment about how rounding isn't calculus and attempts to leave quietly* -Trevor
Don't leave, you were on a roll!

-Jakob
__________________
Functional Lasers

 405nm 12x Diode: 400mA: Jayrob Keychain CR2 Host: 505mW
 405nm SF-AW210 Diode: 240mA: Jayrob 4171 Flashlight Host: 210-220mW
 445nm XJ-A140 Diode: 280mA: Dorcy Junior Host: 200mW
 445nm XJ-A140 Diode: 1500mA: Hotlights 18650 Host: 1600mW
 473nm Oceanus 5mW RPL Style: <5mW
 532nm Rayfoss 200mW Adjustable Focus Pointer: 150-190mW
 532nm BudgetGadget 50mW Keychain Pointer: 60mW
 532nm DX 5mW Pointer: 8mW
 543nm Coherent 0.5mW HeNe Laser: 1mW
 593.5nm CNI Rigel Pen-Style Pointer: <5mW
 650nm LPC-815 Diode: 380mA: [COLOR=white][FONT=Verdana]FT-NS-3AAA TaskForce Flashlight Host: [COLOR=red]200-220mW

11-02-2010, 04:07 AM #26
 Class 3B Laser Join Date: Jul 2009 Location: Boulder, CO Posts: 4,467 Rep Power: 842
Trevor
Class 3B Laser

Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,467
Rep Power: 842
Re: Looking for a special equation...

The % means essentially 'the remainder of.'

So, you're dividing ( |x| + 0.5 ) by 1 and taking the remainder, and subtracting it from ( |x| + 0.5 ), effectively rounding. You then multiply by ( |x| / x ) to get the original sign back.

@above: Thanks.

-Trevor
__________________
There's a fundamental truth to our nature. Man must explore.

Code:
```23:10 <ARG>    nothing has blown up yet :)
23:10 <Trevor> that is a distressingly low standard for success```

11-02-2010, 04:10 AM #27
 Class 2M Laser Join Date: Feb 2009 Location: Shepherdstown, WV Posts: 505 Rep Power: 18
pianoman2011
Class 2M Laser

Join Date: Feb 2009
Location: Shepherdstown, WV
Posts: 505
Rep Power: 18
Re: Looking for a special equation...

Figured out what I can directly type into my calculator to give me the answer! It's the integer function:

[MATH]
[NUM]
[5]

^^That's what you press on a TI-84 to get to the function.

So int(x+0.5) gives me that answer.
Example: int(4.7+.5)=5

Now I'm just wondering how the int() function works

-Jakob
__________________
Functional Lasers

 405nm 12x Diode: 400mA: Jayrob Keychain CR2 Host: 505mW
 405nm SF-AW210 Diode: 240mA: Jayrob 4171 Flashlight Host: 210-220mW
 445nm XJ-A140 Diode: 280mA: Dorcy Junior Host: 200mW
 445nm XJ-A140 Diode: 1500mA: Hotlights 18650 Host: 1600mW
 473nm Oceanus 5mW RPL Style: <5mW
 532nm Rayfoss 200mW Adjustable Focus Pointer: 150-190mW
 532nm BudgetGadget 50mW Keychain Pointer: 60mW
 532nm DX 5mW Pointer: 8mW
 543nm Coherent 0.5mW HeNe Laser: 1mW
 593.5nm CNI Rigel Pen-Style Pointer: <5mW
 650nm LPC-815 Diode: 380mA: [COLOR=white][FONT=Verdana]FT-NS-3AAA TaskForce Flashlight Host: [COLOR=red]200-220mW

11-02-2010, 04:12 AM #28
 Class 2M Laser Join Date: Feb 2009 Location: Shepherdstown, WV Posts: 505 Rep Power: 18
pianoman2011
Class 2M Laser

Join Date: Feb 2009
Location: Shepherdstown, WV
Posts: 505
Rep Power: 18
Re: Looking for a special equation...

Quote:
 The % means essentially 'the remainder of.' So, you're dividing ( |x| + 0.5 ) by 1 and taking the remainder, and subtracting it from ( |x| + 0.5 ), effectively rounding. You then multiply by ( |x| / x ) to get the original sign back. @above: Thanks. -Trevor
Ohh ok now I just have to figure out how to put the "remainder of" in terms my calculator can recognize!

-Jakob
__________________
Functional Lasers

 405nm 12x Diode: 400mA: Jayrob Keychain CR2 Host: 505mW
 405nm SF-AW210 Diode: 240mA: Jayrob 4171 Flashlight Host: 210-220mW
 445nm XJ-A140 Diode: 280mA: Dorcy Junior Host: 200mW
 445nm XJ-A140 Diode: 1500mA: Hotlights 18650 Host: 1600mW
 473nm Oceanus 5mW RPL Style: <5mW
 532nm Rayfoss 200mW Adjustable Focus Pointer: 150-190mW
 532nm BudgetGadget 50mW Keychain Pointer: 60mW
 532nm DX 5mW Pointer: 8mW
 543nm Coherent 0.5mW HeNe Laser: 1mW
 593.5nm CNI Rigel Pen-Style Pointer: <5mW
 650nm LPC-815 Diode: 380mA: [COLOR=white][FONT=Verdana]FT-NS-3AAA TaskForce Flashlight Host: [COLOR=red]200-220mW

11-02-2010, 04:16 AM #29
 Class 3B Laser Join Date: Jul 2009 Location: Boulder, CO Posts: 4,467 Rep Power: 842
Trevor
Class 3B Laser

Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,467
Rep Power: 842
Re: Looking for a special equation...

Quote:
 Originally Posted by pianoman2011 Now I'm just wondering how the int() function works -Jakob
It's low level enough (programmatically speaking) to where I'd bet it's just memory manipulation, not a pure (mathematically speaking) formula.

I'd start by checking out how the "float" (or "double" too) datatype works.

EDIT: [2nd] + [0] -> [R] -> scroll down a bit. round() is there on my TI-83. I thought you were trying to avoid built-in functions.

EDIT 2: round(X, 0) gives me a nice step function.

-Trevor
__________________
There's a fundamental truth to our nature. Man must explore.

Code:
```23:10 <ARG>    nothing has blown up yet :)
23:10 <Trevor> that is a distressingly low standard for success```

Last edited by Trevor; 11-02-2010 at 04:26 AM.

11-02-2010, 04:28 AM #30
 Class 2M Laser Join Date: Feb 2009 Location: Shepherdstown, WV Posts: 505 Rep Power: 18
pianoman2011
Class 2M Laser

Join Date: Feb 2009
Location: Shepherdstown, WV
Posts: 505
Rep Power: 18
Re: Looking for a special equation...

Quote:
 It's low level enough (programmatically speaking) to where I'd bet it's just memory manipulation, not a pure (mathematically speaking) formula. I'd start by checking out how the "float" (or "double" too) datatype works. EDIT: [2nd] + [0] -> [R] -> scroll down a bit. round() is there on my TI-83. I thought you were trying to avoid built-in functions. -Trevor
Yeah, avoiding built-in functions was one of the things I was attempting I think I'm gonna write down all of the information/equations I got out of this thread, look up how the float and integer functions work, and then try to work out an equation that doesn't use "int(x)".

I'll let ya' know when I come to a solution! Thanks.

-Jakob
__________________
Functional Lasers

 405nm 12x Diode: 400mA: Jayrob Keychain CR2 Host: 505mW
 405nm SF-AW210 Diode: 240mA: Jayrob 4171 Flashlight Host: 210-220mW
 445nm XJ-A140 Diode: 280mA: Dorcy Junior Host: 200mW
 445nm XJ-A140 Diode: 1500mA: Hotlights 18650 Host: 1600mW
 473nm Oceanus 5mW RPL Style: <5mW
 532nm Rayfoss 200mW Adjustable Focus Pointer: 150-190mW
 532nm BudgetGadget 50mW Keychain Pointer: 60mW
 532nm DX 5mW Pointer: 8mW
 543nm Coherent 0.5mW HeNe Laser: 1mW
 593.5nm CNI Rigel Pen-Style Pointer: <5mW
 650nm LPC-815 Diode: 380mA: [COLOR=white][FONT=Verdana]FT-NS-3AAA TaskForce Flashlight Host: [COLOR=red]200-220mW

11-02-2010, 04:32 AM #31
 Class 3R Laser Join Date: Apr 2008 Location: South Florida Posts: 1,544 Rep Power: 134
Jimmymcjimthejim
Class 3R Laser

Join Date: Apr 2008
Location: South Florida
Posts: 1,544
Rep Power: 134
Re: Looking for a special equation...

Quote:
 Originally Posted by twhite828 Forgive the assumption.
Need there be more to be said, you are forgiven
Wish I could help you guys out, but I'm too tired to think right now. Would've expected the solution to be a little bit simpler, but that's just a matter of taste. Night' folks.
__________________
Current Lasers:
8??nm: 1050mA DIY Micro Sized
658nm: 2mW keychain pointer - DIY 80mA/350mA switchable in Altoids tin - 300mA DIY Micro Sized
632.8nm: 10mW Hughes HeNe - 15mW Melles Griot HeNe - 1mW Melles Griot bare tube
612nm: 5mW Meredith Instruments HeNe
594.1nm: 4mW Meredith Instruments HeNe
543nm: 2mW Melles Griot HeNe - <1mW Multimode 6" HeNe (He's cute!)
532nm: 5mW Lyra-G5 - 70mW DIY by Wannaburn
473nm: 5mW Lab Style
445nm: DIY 650mA in Sonar II Host
405nm: DIY LG 10X at 330mA with Ehgemus host and Microboost - CNI GLP-405 70mW

11-02-2010, 11:25 PM #32
 Class 2 Laser Join Date: Aug 2010 Location: Northern Hemisphere(Ohio,USA), Earth Posts: 382 Rep Power: 24
Vaporizer
Class 2 Laser

Join Date: Aug 2010
Location: Northern Hemisphere(Ohio,USA), Earth
Posts: 382
Rep Power: 24
Re: Looking for a special equation...

Integers by definition are whole numbers. No decimals or fractions.
I don't see how this is gonna be accurate for anything but estimating.
If you used this definition and the TI is using a true integer
5.9 + 6.1 = 11 not 12.

I'll stick with the >5 rule lol
__________________
Experience is what you get when you didn't get what you wanted.

Ohm's Law Calculator
Parallel Resistance Calculator
LM317 Current Calculator
LM317 Voltage Calculator

I Want to Build a Laser
First Build Guide

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

All times are GMT. The time now is 05:48 AM.

 -- DarkShadows V5 -- Responsive LPF -2562016 -- Default Style Contact Us - Laser Pointer Forums - Archive - Top