# Questions tagged [expression-test]

148 questions
Filter by
Sorted by
Tagged with
238 views

### How do I check if proportion of values in list are mostly positive?

I'd like to return a a boolean variable that tells me whether numbers in a list are mostly positive. For example: a = {3,2,3,4,-1,-2,-5,3} There are 5 ...
572 views

### how to write a condition for all elements of a list

I have a list a={no,no,no,no}; now I can want to an If so that if all elements of the above list are "yes" it does something ...
147 views

### when two associations are equal?

<|a -> 2, b -> 3|> == <|b -> 3, a -> 2|> returns False; can anybody explain why? If I am not mistaken ...
75 views

585 views

### Is there a GraphicsPrimitiveQ (or a complete list of Heads of graphics primitives)?

For various reasons related to workflow associated with creating figures for journals, I am creating functions that will accept graphics primitives and a set of options and spit out a ...
2k views

### Evaluating an If condition to yield True/False

I would like to decide whether an option passed to my custom function has the value Automatic or something else. This is my attempt: ...
15 views

### I want to extract coefficients of a linear formula. But my code didn't work [duplicate]

I want to extract coefficients of a linear formula and I wrote the following function. But it didn't work. ...
108 views

### Create my own PrimeQ function [closed]

I want to create my own functions, for example: Functions like IntegerQ,EvenQ and OddQ. My ...
44 views

### How to use === with condition?

I have two expressions, and they are same when k is positive and x is non-zero real number. Below code gives me ...
42 views

### How to test consistency of two assertions without hacking

Suppose I have a set of assumptions assum = x ∈ Reals && y ∈ Reals and I want to test an assertion like ...
80 views

### TrueQ returns False [closed]

I have coefficient of some expansion: Workingexpansion = tau/n - (A tau^2)/(27 n^3) - (B tau^3)/(5832 n^5); CoefficientList[Workingexpansion, tau][[2]] ...
87 views

### Trying to generate random even number

I am trying to generate a random even number, and then try to write the list of primes that are composing it as Goldbach conjecture says. It's just a test to learn how to use mathematica, so I would ...
58 views

### Testing for membership with Bags?

Is there a faster way to test for membership in an Internal`Bag other than unpacking the whole thing like this? ...
89 views

### How to tell whether a character is a letter-like form

Is there any way to programmatically tell whether a given character is a letter or letter-like form (see this reference page for what I mean)? One idea I had was to use ...
3k views

### Determine whether some expression contains a given symbol

Given a symbol t and an expression expr, how can I determine whether or not the symbol t ...